I am evaluating the free version in hopes of purchasing because it is awesome.
I have a problem with disableCheckbox call. It doesn’t work for me. Here is my code:
tree=new dhtmlXTreeObject(“treeboxbox_tree”,“100%”,“100%”,0);
tree.setSkin(‘dhx_skyblue’);
tree.setImagePath(“codebase/imgs/csh_scbrblue/”);
tree.enableDragAndDrop(true);
tree.enableCheckBoxes(1);
tree.enableThreeStateCheckboxes(true);
tree.disableCheckbox(mrit,1);
tree.loadXML(“common/sri-matrix.xml”);
mrit always comes back as undefined in firefox and ie.
What am I doing wrong?
Olga
#2
Please check if “mrit” is id of existent item
Olga, thanks for responding mrit is an existing node
Here is a short version of my xml
<?xml version="1.0" encoding="iso-8859-1"?>
Olga
#4
Unfortunately we cannot reproduce this issue locally. Please check example here dhtmlx.com/docs/products/dht … boxes.html
I solved the problem.
- I upgraded to pro.
- I placed mrit in single quotes ‘mrit’
tree.disableCheckbox(‘mrit’,1);
- I had to place it after the call to load the xml.
tree.loadXML(“common/sri-matrix.xml”);
tree.disableCheckbox(‘mrit’,1);
Actually you need to call disableCheckbox from “loading end” handler as loadXML method loads data asynchronously:
tree.loadXML(“common/sri-matrix.xml”,doAfterLoading);
function doAfterLoading(){
tree.disableCheckbox(‘mrit’,1);
}