Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Benson on May 24, 2007 16:21
open dhtmlx forum
Lock row

Is it possible to freeze some row from D&D? That means, when D&D, checked rowId first, if it is special one, it will be locked and not let to be D&D.
Answer posted on May 24, 2007 16:48
There is no such functionality , you can set onDrag handler to filter d-n-d, in such case any row can be dragged, but only allowed row can be droped ( not exactly the desired behaviour )

There is no public event, but you can manually inject code in dhtmlGrid_drag.js , function _createDragNode, for example next line

dhtmlXGridObject.prototype._createDragNode=function(htmlObject,e){
        if (!this.callEvent("onBeforeDrag",[htmlObject.parentNode.idd])) return null;

This will introduce new grid event - onBeforeDrag, which will be called before d-n-d, and returning false from which will block d-n-d operation.


Answer posted by Stanislav (Support) on Dec 11, 2014 04:08

I hope this information will be enough for you. But you also can have a look at tab navigation javascript and dhtml forum.