当用户在grid中拖放一行时触发。
sid | string|number | 被移动任务的ID |
parent | string|number | 父节点ID。详细说明见下文 |
tindex | number | 任务被移动前的位置索引 (整个树中的索引)。如果指定,tindex对应于“parent”分支中的索引。详见下文 |
boolean | 决定默认事件动作是否继续执行(true)或被取消(false) |
gantt.attachEvent("onBeforeRowDragEnd", function(id, parent, tindex){
const task = gantt.getTask(id);
if(task.parent != parent)
return false;
return true;
});
当使用鼠标在左侧grid中移动任务时触发此事件,前提是启用了order_branch设置。如果关闭了分支重新排序功能,则不会触发此事件。