DataGrid row formatting

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

Guest

How can I change the background color/forecolor for specific rows in a datagrid

TIA, Katie
 
Hi Katie,
You can do it in ItemDataBound event in the datagrid.
For eg:
if(put your condition here){

e.Item.Attributes.Add("style","color:blue;background-color:lightyellow");
}
This will change the font color and background color of the row(s).
HTH,
Regards,

Marshal Antony

..NET Developer

http://www.dotnetmarshal.com
 
Back
Top