Here I describe how to set the background colour of a GWT-Ext grid row. A simple use of this would be to highlight a row containing errors.
You would need to attach a GridView instance to the grid.
private EditorGridPanel grid;
private GridView gridView
1. Instantiate and initialize the grid
2. Initialize the GridView
3. Set the GridView instance to the grid by calling: grid.setView(gridView);
The below lines of code actually set the background color of a particular row to red colour
int rowIndex = grid.getStore().indexOf(record); //where record is the selected Record instance that needs to be highlighted
Element currentRow = gridView.getRow(rowIndex); //get the GWT Element instance for the row
currentRow.getStyle().setProperty(“backgroundColor”, “red”); //set the colour
You can also highlight a particular cell. You would need to get a reference to the particular cell using gridView.getCell(rowIndex, colIndex) method.
A related topic on setting the background colour: