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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top