onColumnResizeEnd
info
This functionality is available in the PRO edition only.
Description
Fires after the user finished dragging the column's border to resize the column
onColumnResizeEnd: (index: number, column: GridColumn, new_width: number) => boolean;
Parameters
index- (required) number - the column indexcolumn- (required) GridColumn - the column objectnew_width- (required) number - the new column's width
Returns
result- (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)
Example
// return false to discard the resize action
gantt.attachEvent("onColumnResizeEnd", function(index, column, new_width){
gantt.message.hide(message);
message = null;
gantt.message(`Column <b>${gantt.locale.labels["column_"+column.name]}
</b> is now ${new_width}px width`);
return true;
});
Related samples
Details
The event is blockable. Returning false will cancel column resizing.