onGridResizeEnd
info
This functionality is available in the PRO edition only.
Description
Fires after the user finished dragging the grid's border to resize the grid
onGridResizeEnd: (old_width: number, new_width: number) => boolean;
Parameters
old_width- (required) number - the initial grid's widthnew_width- (required) number - the new grid'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("onGridResizeEnd", function(old_width, new_width){
gantt.message.hide(message);
message = null;
gantt.message(`Grid is now <b>${new_width}</b>px width`);
return true;
});
Related samples
Details
The event is blockable. Returning false will cancel grid resizing.