Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Feb 13, 2007 14:36
open dhtmlx forum
I want to hide checkboxes for some items. After installed the prof edition of the dhtmlxtr...

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?

Answer posted on Feb 13, 2007 14:37

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.

Answer posted by sematik (Support) on Dec 08, 2014 22:27

If you haven't found the needed information there and still looking for a solution, you will find the additional help checking datagrid footer and javascript calendar for website.