I want to hide checkboxes for some items. Aft

I want to hide checkboxes for some items.

After installed the prof
edition of the dhtmlxtree I tried the function hide checkbox

                                               tree=new dhtmlXTreeObject(“treeboxbox_tree”,“100%”,“100%”,0);
                                               tree.setImagePath(“dhtmlxTree/imgs/”);
                                               tree.enableCheckBoxes(1);
                                               tree.enableThreeStateCheckboxes(false);
                                               tree.loadXML(“dhtmlxTree/treefromdb.php?id={id}”);
                                               tree.showItemCheckbox(1,0);

The xml-tree load but
the checkbox with id 1 doesn’t disappear.

What am I doing wrong?

The loading of tree is async. So when
tree.showItemCheckbox(1,0); command is executed tree is not loaded yet, and
command just skipped.

One
of possible correct ways is next:

                function my_func(){
                                               tree.showItemCheckbox(1,0);
                }
                …
                tree.enableThreeStateCheckboxes(false);
                tree.setOnLoadingEnd(my_func);
                tree.loadXML(“dhtmlxTree/treefromdb.php?id={id}”);

 

P.S.
XML can contain attribute “hidden” which forces checkbox hiding.