2

I am trying to change the styling with alternate rows having different color for the sample treegrid : http://docs.sencha.com/ext-js/4-0/#!/example/tree/treegrid.html . How can i achieve this?

srikanth
  • 53
  • 7

1 Answers1

0

Have you tried using getRowClass configuration?

viewConfig: {
    getRowClass: function(record) {
        if(!record) return '';
        if(record.data.id == user.id) return 'bg-yellow';
    }
},
sha
  • 17,824
  • 5
  • 63
  • 98
  • I tried the getRowClass. For the first time when tree gets loaded, the alternate row styling is working good. But, when i do expand or collapse of any node, this styling doesn't work. Any way Thanks for your reply. – srikanth May 31 '12 at 02:20