How we change the row color in treegrid

Hi,



I have to change the row color & bgcolor in the treegrid depending on situation.

Please provide me some sample code or function that helps me to implements this feature in the treegrid.





Thanks in advanced.

You can use
grid.setRowTExtStyle(rowID,style);

for example

grid.setRowTExtStyle(rowID,“color:red; background-color:black;”);


Also, row styles can be set directly from XML, by using row@style attribute


Hi,



Is there any option that is used with addrow function that can change the bgcolor of that new added row. Please guide me.



 



Thanks



 

There is no way to specify it as part of addRow, but you can do as

var id =- mygrid.uid();
mygrid.addRow(id,…
mygrid.setRowTextStyle(id,…