Hi,
1)
in dhtmlxtreegrid the first level node has a long text. So I want to use colspan. How do I configure in script?
2)
How can I change the value of nodes in treegrid? I tried
mygrid.cellById(1,2).setValue(“New_Value”);
and
mygrid.cell(1,2).cell.innerHTML.setValue(“New_Value”);
but no success.
Thanks for help.
1) Unfortunately there is no way colspan “tree” cells
2) Fist parameter of cellById is id of a row. So you should use:
mygrid.cellById(“1”,2).setValue(“New_Value”);
1) solved with xml. OK
2) Unfortunatly it doesn’t work. There is an Error: _childindexes are Null or not an object. Is anything wrong in the attached file?
My script:
[]
mygrid.init();
mygrid.loadXML(“test_list.xml”);
//change Values
//sample1
mygrid.cellById(??,??).setValue(“new_Value”);
//sample2
mygrid.cellById(??,??).setValue(“new_Value”);
//sample3
mygrid.cellById(??,??).setValue(“new_Value”);
thanks for help
test_list.xml.zip (401 Bytes)
cellById() method should be called only after treeGrid was fully loaded:
mygrid.loadXML(“test_list.xml”,function(){
//sample1
mygrid.cellById(??,??).setValue(“new_Value”);
//sample2
mygrid.cellById(??,??).setValue(“new_Value”);
//sample3
mygrid.cellById(??,??).setValue(“new_Value”);
});
In your xml file rows has ids: “1214”, “1213”, “1212”… So you should use:
mygrid.cellById(“1214”,0).setValue(“new_Value”);