Datagrid row backcolor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I have got a field into the table as int (0,1,2,3,4). I want to set the
back color with status values , Say if
Status
0 = Red
1 = Green
2 = Blue ,so on...

What is the best way of setting the row back color with the status value

Thanks in advance..

Regards,

das
 
Hello,
Overriding OnPaint method of the appropriate ColumnStyle and changing
back or fore brush according to the status values. You get source and
rowNum in OnPaint override.

HTH. Cheers.
Maqsood Ahmed [MCP C#,SQL Server]
Kolachi Advanced Technologies
http://www.kolachi.net
 
Back
Top