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.
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.
Nevermind:
view: new Ext.grid.GridView({
getRowClass: function(rec, idx, rowPrms, ds) {
return rec.data.isRead === false ? 'ph-bold-row' : '';
}
})
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' : '';
}
}