View Full Version : Modifying rows on Editor Grid problem

14 Jun 2010, 8:39 AM

I need to change the style of a row as the grid is initialising. I read the post in the FAQ which worked for me,


except that when the grid is initialised, the width of all columns has been changed (set to 0).

Apart from that all is working fine. I assume it's something to do with the class being returned in the getRowClass function:

var grid = new Ext.grid.EditorGridPanel({
renderTo: 'gridContainer',
width: 1300,
height: 700,
columns: columnModel,
store: remoteJsonStore,
loadMask: true,
stripeRows: true,
viewConfig: {
forceFit: true
}, viewConfig: {

getRowClass: function(row, index) {
var cls = '';
var data = row.data;
if (data.shading == true) {
cls = 'x-grid3-row-shaded';// which is 'background-color: red !important;'
} else {
cls = 'x-grid3-row';
return cls;
Does anyone know how to prevent this?

Many thanks

14 Jun 2010, 11:58 PM

Please find attached screenshot of grid.