beforeColumnDrag
fires before dragging of a column has started
beforeColumnDrag: (data: IDragInfo, events: MouseEvent) => void | boolean;
Parameters:
data: object
- data objectevents: MouseEvent
- a native HTML event object
Returns:
Return false
to prevent dragging of a column; otherwise, true
.
Example
treegrid.events.on("beforeColumnDrag", function(data, events){
// your logic here
return false;
});
The data object contains the following parameters:
start | (string, number) the id of a column, from which the dragging process has started |
source | (array) an array with ids of dragged columns |
target | (string, number) the id of a potential target column |
Change log:
- added in v6.5
- Before v7.0, the event took one parameter - the column id.
- Starting from v7.0, the event takes two parameters: data and e.