Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sashi on Jun 01, 2007 15:23
open dhtmlx forum
dhtmlxtree

I want to perform a selection of all elements in the tree hierarchy. When the user clicks on a link say'Select All' ..i wud direct to a javascript function say selectAll where I wud do
channelDhtmlxTree.setCheck(channelDhtmlxTree.getSelectedItemById(), true)
However, I don't see the checkboxez being checked upon clicking on the link!
However, if I select one of the elements, only that element is getting checked after I click on 'Select All'.

In short,Cud u pls help me in providing a way to select and deselect all items in the tree hierarchy?
Answer posted on Jun 01, 2007 19:43
The setCheck operation check only ONE item at once, in your scenario you must use something similar to next
    var ids=channelDhtmlxTree.getSelectedItemById().split(",")
    for (var i=0; i<ids.length; ids++)
        channelDhtmlxTree.setCheck(ids[i], true);

Answer posted by Andrei (Support) on Nov 28, 2014 04:43

Not much can be said in addition to the reply above, but you also can check web design templates and dhtml database and find out what we have probably missed in our explanation.