How can I change the row colour in datagrid based upon the severity condition? I\'m new to this EXTJS topic. I used to reader to read, store to store and writer to write the
You can do it by using the getRowClass
method of GridView
(see Ext JS API).
Quoted example from API documentation:
viewConfig: {
forceFit: true,
showPreview: true, // custom property
enableRowBody: true, // required to create a second, full-width row to show expanded Record data
getRowClass: function(record, rowIndex, rp, ds){ // rp = rowParams
if(this.showPreview){
rp.body = ''+record.data.excerpt+'
';
return 'x-grid3-row-expanded';
}
return 'x-grid3-row-collapsed';
}
},