Categories | Question details Back To List | ||
DhtmlxTreeGrid DragnDrop or DragnCopy using CTRL-Key Hi, we are using DhtmlxTreeGrid Professional. While dragging a Tree Item and holding down the CTRL-Key we want to Copy the Item instead of moving it. there is a solution for DhtmlxTree (http://www.dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=9732&ssr=yes&s=ctrl tree). Is there an equal solution when using DhtmlxTreeGrid ? Answer posted by dhxSupport on Jul 01, 2009 05:39 Similar changes you should do in the dhtmlxgrid_drag.js file from the dhtmlxGrid package. Line var text=this.callEvent("onBeforeDrag",[htmlObject.parentNode.idd,htmlObject._cellIndex]); should be replaces with: var text=this.callEvent("onBeforeDrag",[htmlObject.parentNode.idd,htmlObject._cellIndex,(e||event)]); Now during treeGrid's init, the next code can be used: mygrid.attachEvent("onBeforeDrag",function(id,ind,ev){ this.enableMercyDrag(ev.ctrlKey) return true; }); |