The onColumnMoved event handler fires when column moving is finished, after the column has been moved to the target position.
DayPilot.Kanban.onColumnMoved(args)args.column (object) - the column being moved
args.position (number) - target position index
args.previous (object) - column preceding the target position
args.next (object) - column following the target position
The source data object is accessible as args.column.data.
JavaScript
const kanban = new DayPilot.Kanban("dp", {
columnMoveHandling: "Update",
onColumnMoved: (args) => {
kanban.message("Column " + args.column.data.name + " was moved.");
},
// ...
});
kanban.init();Angular
<daypilot-kanban [config]="config"></daypilot-kanban>config: DayPilot.KanbanConfig = {
columnMoveHandling: "Update",
onColumnMoved: (args) => {
DayPilot.Modal.alert("Column " + args.column.data.name + " was moved.");
},
// ...
};React
<DayPilotKanban
columnMoveHandling="Update"
onColumnMoved={onColumnMoved}
{/* ... */}
/>const onColumnMoved = (args) => {
DayPilot.Modal.alert("Column " + args.column.data.name + " was moved.");
};Vue
<DayPilotKanban
columnMoveHandling="Update"
@columnMoved="onColumnMoved"
<!-- ... -->
/>const onColumnMoved = (args) => {
DayPilot.Modal.alert("Column " + args.column.data.name + " was moved.");
};