Skip to main content

onGridResize

info

This functionality is available in the PRO edition only.

Description

Fires when the user is dragging the grid's border to resize the grid

onGridResize: (old_width: number, new_width: number) => void;

Parameters

  • old_width - (required) number - the initial grid's width
  • new_width - (required) number - the new grid's width

Example

gantt.attachEvent("onGridResize", function(old_width, new_width){
if(!message){
message = gantt.message({expire:-1,
text:"Grid is now <b id='width_placeholder'></b><b>px</b> width"});
}
document.getElementById("width_placeholder").innerText = new_width;
});