onRowDragStart
Description
在用户拖动网格中的一行以垂直重新排序之前触发
onRowDragStart: (id: string | number, target: HTMLElement, e: Event) => boolean;
Parameters
id- (required) string | number - 用户在网格中拖动的任务的 IDtarget- (required) HTMLElement - 用户拖动的任务的 HTML 元素e- (required) Event - 原生事件对象
Returns
result- (boolean) - 定义事件默认行为是否会被触发(true)或取消(false)
Example
gantt.attachEvent("onRowDragStart", function(id, target, e) {
// 在这里插入您的自定义逻辑
return true;
});
Related samples
Details
注释
当左侧网格中通过鼠标指针移动任务,并且启用 order_branch 设置时,将触发此事件。如果分支重新排序被禁用,则永远不会调用该事件。
该事件是可拦截的。返回 false 以取消拖动。
Related API
Related Guides
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.