DayPilot.Kanban.onColumnMove

Fired when the column moving is finished (the column is dropped at the target position) but before the column is actually moved. You have a chance to cancel the moving here.

Declaration

DayPilot.Kanban.onColumnMove(args);

Parameters

  • args.column (DayPilot.Column object) - the column being moved
  • args.position (integer) - target position (index)
  • args.previous (DayPilot.Column object) - column preceding the target position
  • args.next (DayPilot.Column object) - column following the target position
  • args.preventDefault() - cancels the default action

The source data object is accessible as args.column.data.

Example

<div id="dp"></div>

<script type="text/javascript">

    var dp = new DayPilot.Kanban("dp");
    
    // ...

    dp.columnMoveHandling = "Update";

    dp.onColumnMove = function(args) {
      if (!confirm("Do you really want to move this column?")) {
        args.preventDefault();
      }
    };

    dp.init();

</script>