(Available as of the 2015.3.1014 release) Fires while the user is dragging and item. This event is triggered on every mouse move. The event handler function context (available through the this keyword) will be set to the widget instance.
k-i-insert-up
- Indicates that the item will be inserted on top.
k-i-insert-middle
- Indicates that the item will be inserted in the middle.
k-i-insert-down
- Indicates that the item will be inserted at the bottom.
k-i-plus
- Indicates that the item will be added/appended.
k-i-cancel
- Indicates an invalid operation. DO NOT overwrite this class as the drag logic depends on it.
<divid="treelist"></div><script>var service ="https://demos.telerik.com/service/v2/core";$("#treelist").kendoTreeList({dataSource:{transport:{read:{url: service +"/EmployeeDirectory/All"}},schema:{model:{id:"EmployeeID",parentId:"ReportsTo",fields:{ReportsTo:{field:"ReportsTo",nullable:true},EmployeeID:{field:"EmployeeId",type:"number"},Extension:{field:"Extension",type:"number"}},expanded:true}}},height:540,editable:{move:true},columns:[{field:"FirstName",title:"First Name",width:220},{field:"LastName",title:"Last Name",width:160},{field:"Position"}],drag:function(e){/* The result can be observed in the DevTools(F12) console of the browser. */console.log("dragging", e.source, e.target);}});</script>
<divid="treeList"></div><script>var service ="https://demos.telerik.com/service/v2/core";functiondrag(e){/* The result can be observed in the DevTools(F12) console of the browser. */console.log("dragging");}$("#treeList").kendoTreeList({dataSource:{transport:{read:{url: service +"/EmployeeDirectory/All"}},schema:{model:{id:"EmployeeID",parentId:"ReportsTo",fields:{ReportsTo:{field:"ReportsTo",nullable:true},EmployeeID:{field:"EmployeeId",type:"number"},Extension:{field:"Extension",type:"number"}},expanded:true}}},height:540,editable:{move:true},columns:[{field:"FirstName",title:"First Name",width:220},{field:"LastName",title:"Last Name",width:160},{field:"Position"}]});var treeList =$("#treeList").data("kendoTreeList");
treeList.bind("drag", drag);</script>
<divid="treelist"></div><script>var service ="https://demos.telerik.com/service/v2/core";$("#treelist").kendoTreeList({dataSource:{transport:{read:{url: service +"/EmployeeDirectory/All"}},schema:{model:{id:"EmployeeID",parentId:"ReportsTo",fields:{ReportsTo:{field:"ReportsTo",nullable:true},EmployeeID:{field:"EmployeeId",type:"number"},Extension:{field:"Extension",type:"number"}},expanded:true}}},height:540,editable:{move:{reorderable:true}},columns:[{field:"FirstName",title:"First Name",width:220},{field:"LastName",title:"Last Name",width:160},{field:"Position"}],drag:function(e){// Replace the "add" icon with a "copy" icon. DO NOT REPLACE THE i-cancel status!if(e.status==='plus'){
e.setStatus("copy");}}});</script>