onBeforeRowDragMove
Description
在网格中的某一行被垂直拖动到不同位置之前触发
onBeforeRowDragMove: (id: string | number, parent: string | number, tindex: number) => boolean;
Parameters
id- (required) string | number - 要在网格中移动的任务的 idparent- (required) string | number - 父级 idtindex- (required) number - 将要移动到的父分支中的位置索引
Returns
result- (boolean) - 定义事件的默认操作是否会被触发(true)还是取消(false)
Example
gantt.attachEvent("onBeforeRowDragMove", function(id, parent, tindex){
// return true/false;
});
Details
该事件是可阻止的。返回 false 以取消移动该行。
注释
当选项 order_branch 被设置为 "marker" 值时,才会触发该事件。
Related API
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.