Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Alok on Jul 24, 2008 23:26
open dhtmlx forum
when you uncheck all the child nodes then the parent will get unchecked, but my requirement is that the parent still need to be in checked state

Thanks for the reply

But my query was …
when you uncheck all the child nodes then the parent will get unchecked, but my requirement is that the parent still need to be in checked state

Not to block the un-checking of the parent
For instance it could be like this
Check the parent and uncheck all the child nodes, the parent to be in checked state

Parent – checked
-Child   unchecked
-Child   unchecked
-Child   unchecked

Answer posted by Support on Jul 25, 2008 02:33
Can be achieved by next code modification.

dhtmlxtree.js , line 1646
dhtmlXTreeObject.prototype._correctCheckStates=function(dhtmlObject){
...
if ((flag1)&&(flag2)) this._setCheck(dhtmlObject,"unsure");
   else if (flag1)  this._setCheck(dhtmlObject,false);
      else  this._setCheck(dhtmlObject,true);


can be changed to
if ((flag1)&&(flag2)) this._setCheck(dhtmlObject,"unsure");
   else if (!flag1) this._setCheck(dhtmlObject,true);