跳到主要内容

onGridResize

信息

此功能仅在PRO版本中可用。

Description

当用户拖动grid边框调整其大小时触发

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

Parameters

  • old_width - (required) number - 调整大小前grid的宽度
  • new_width - (required) number - 调整大小后grid的宽度

Example

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