跳到主要内容

onColumnResizeStart

信息

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

Description

在用户开始拖动列边框以调整列宽之前触发

onColumnResizeStart: (index: number, column: GridColumn) => boolean;

Parameters

  • index - (required) number - 列的索引
  • column - (required) GridColumn - 列对象

Returns

  • result - (boolean) - 定义事件的默认操作是否将被触发(true)还是取消(false

Example

// 返回 false 以取消调整列宽操作
gantt.attachEvent("onColumnResizeStart", function(index, column){
gantt.message("开始调整 " + gantt.locale.labels["column_"+column.name]);
return true;
});

Details

该事件是可阻塞的。返回 false 将不允许列调整。

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.