tags:

views:

132

answers:

2

I have records with a boolean value, and depending on the boolean value, I would like the GridPanel's rows to be rendered bold. I'm sure there is a nice GridView style way to do this but I can't seem to find it.

Thanks.

+2  A: 

Nevermind:

view: new Ext.grid.GridView({
            getRowClass: function(rec, idx, rowPrms, ds) {
                return rec.data.isRead === false ? 'ph-bold-row' : '';
            }
        })
Scott
+2  A: 

Your answer is correct, but I want to point out that there's no need to provide an instantiated GridView instance in order to override getRowClass. Use the GridPanel's viewConfig instead:

viewConfig: {
    getRowClass: function(rec, idx, rowPrms, ds) {
        return rec.data.isRead === false ? 'ph-bold-row' : '';
    }
}
bmoeskau