Go Back   SmartClient Forums > Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 2nd Mar 2010, 09:25
fernandomm fernandomm is offline
Registered Developer
 
Join Date: May 2009
Posts: 114
Default How to set background color of a row in the treegrid?

Hello,

I have a treegrid and i need to set a background color of the rows that are open.

So i am using the following code:

Code:
for ( i = 0; i < menuTree.data.root.children.length; i++ )
{
      if ( menuTree.data.root.children[i].isOpen )
      {
            menuTree.data.root.children[i].setBackgroundColor( '#f3f3f3' );
      }
}
Unfortunately it is not working. Is there another way to do this or am i doing something wrong?
Reply With Quote
  #2  
Old 2nd Mar 2010, 09:53
davidj6 davidj6 is offline
Registered Developer
 
Join Date: Jan 2008
Posts: 765
Default

See TG.getBaseStyle and TG.getCellStyle. You are likely to override one of those and determine your desired style based on the isOpen property of the record.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


© 2010,2011 Isomorphic Software. All Rights Reserved