Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Joby on May 07, 2008 05:49
open dhtmlx forum
Check box

Respected Sirs,


I have a problem with enableThreeStateCheckboxes() function of dhtmlxTree. I am using version 5 (standard edition). When I select all the childs of a parent, then automatcally the parent will be become fully selceted mode. For this I can't exctley get the user checked items. My need is the parent will be in the partialy checked sate. Another problem is suppose a parant has only one child, then when we check the parent ,the child will become fully checked. My need is the child will be partialy checked state. How to solve these problems.


Thanks

Joby
Answer posted by Support on May 07, 2008 10:24
Both issues not possible with API calls.

>>My need is the parent will be in the partialy checked sate.
It possible to block parent changing of parent node checkbox in such situation.
ghtmlxtree.js , line 3327

dhtmlXTreeObject.prototype.setSubChecked=function(itemId,state){
   var sNode=this._globalIdStorageFind(itemId);
   this._setSubChecked(state,sNode);
  // this._correctCheckStates(sNode.parentObject); - this line can be commented to prevent change of parent level checkbox on child checkbox change
}

>>My need is the child will be partialy checked state.
Such change will mess logic of checkboxes. While it also possible to customize code in necessary way, such change may ( and probably will ) cause incorrect results of other checkbox related commands.