Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Richard White on Oct 09, 2007 18:57
open dhtmlx forum
setValue on treegrid position 0

Hi,

i have a treegrid where column 0 is the tree, and the rest are columns. when i try to set the value of the columns it works fine but when i try to set the value of the tree i get an error. this is the code i get an error on:

mygrid.cells(selectedRowId, 0).setValue(treeValue);

the error i get is this.grid._tgc has no properties

however it works on all the other cells in that row

thanks for the help
Answer posted on Oct 10, 2007 11:32
The tree cell is more complex than default one , it consists of few parts, so instead of default setValue you can use


mygrid.cells(selectedRowId, 0).setLabel(treeValue);  //set text part
or
mygrid.cells(selectedRowId, 0).setImage(treeValue); //set new image url
Answer posted by Richard White on Oct 10, 2007 16:03
Perfect Thanks