DayPilot.Gantt.onRowSelected

Fired when the user selects or deselects a row, after the default RowSelect action (specified by rowSelectHandling property).

Row selecting must be enabled by mapping a selected user action to "Select" first (rowClickHandlingrowDoubleClickHandling).

The default action can be canceled by calling args.preventDefault().

Arguments

  • args.task - holds a DayPilot.Task object representing the task
  • args.selected (boolean) - true if the new state is selected (it can be false if the user clicks the row while holding Ctrl key)
  • args.ctrl (boolean) - true if Ctrl key was pressed when clicking the row
  • args.shift (boolean) - true if Shift key was pressed when clicking the row

Example

dp.onRowSelected = function(args) {
  var was = args.selected ? "selected" : "deselected";
  alert("Task " + args.task.text() + " was " + was);
};