The onRowSelected event handler fires after row selection changes in the Scheduler UI, once the row has already been selected or unselected.
Declaration
DayPilot.Scheduler.onRowSelected(args)Parameters
args.row(DayPilot.Row) - object representing the row whose selection state changedargs.selected(boolean) -trueif the row has just been selected; otherwisefalseargs.ctrl(boolean) -trueif the Ctrl key is pressedargs.shift(boolean) -trueif the Shift key is pressedargs.meta(boolean) -trueif the Meta key is pressed
Notes
This handler runs after the default UI action, so args.selected reflects the new selection state of args.row. The modifier key flags let you distinguish single-row selection from multi-selection gestures.
Examples
JavaScript
const dp = new DayPilot.Scheduler("dp", {
rowSelectHandling: "Update",
onRowSelected: (args) => {
console.log(args.row, args.selected);
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
rowSelectHandling: "Update",
onRowSelected: (args) => {
console.log(args.row, args.selected);
},
// ...
};React
<DayPilotScheduler
rowSelectHandling="Update"
onRowSelected={onRowSelected}
{/* ... */}
/>const onRowSelected = (args) => {
console.log(args.row, args.selected);
};Vue
<DayPilotScheduler
rowSelectHandling="Update"
@rowSelected="onRowSelected"
<!-- ... -->
/>const onRowSelected = (args) => {
console.log(args.row, args.selected);
};See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot