View Full Version : how to foramat grid row depends on the row value

17 Apr 2007, 4:36 AM
Hello All,

How to format grid row depends on the row value,
my value type is boolean depends on boolean value i want to show
different images for yes/no in a cell . same like hot mail in box


17 Apr 2007, 5:05 AM
You mean a grid cell?

If so, use a custom renderer in your ColumnModel

17 Apr 2007, 9:55 PM
Thanks animal

could you please give me an example that,how to set different class name

for a cell depends on the value

17 Apr 2007, 11:40 PM
The first place to go for information is the example code so kindly provided:


Which will provide basic information, and show you the code in use.

The render function is called with the following parameters:

Data value
Cell data. An object in which you may set the following attributes

css A CSS class name string to apply to the table cell
attr An HTML attribute definition string to apply to the data container

Record object from which the data was extracted
Row index
Column index
Store object

You return from it the HTML markup to be placed into the data container which is a DIV inside the table cell.

20 Apr 2007, 10:16 PM
Thanks for your information,