Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by new_user on May 13, 2008 15:10
open dhtmlx forum
getAllChecked() not returning the child id and also the parent id.

Hi,
getAllChecked() not returning the child id and also the parent id.

I have 'US' tree. 'US' is root tree(parent node) and it has multiple regions as children(e.g midwest),each region has multiple states as children (e.g IL), each state has multiple cities.

If i click a particular city (checkbox) within a state, it suppose to return both city id and also the state id. but it's returning only the city id.

Help will be appreciated. Thanks in advance.

Code here:
tree=new dhtmlXTreeObject(document.getElementById('orig_treeview'),'100%','100%',0);
tree.setImagePath('<%= imgPath %&gt;');
tree.enableSmartXMLParsing(false);
tree.enableDistributedParsing(true);
tree.enableTreeImages(false);
tree.enableCheckBoxes(true);
tree.enableThreeStateCheckboxes(1);
tree.loadXML('<%= path %&gt;');

var origSel = tree.getAllChecked();
Answer posted by Support on May 14, 2008 04:13
The getAllChecked returns list of IDs , for which checkbox "fully" checked, it not returns items for which checkbox is "half" checked.
If you need to receive both checked and half-checked items you can use
       tree.getAllCheckedBranches();
Answer posted on May 14, 2008 11:52

Hi,

Thanks for the response.