We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Row Color Change based on field value

How to change the row color based on some field. for example, when i have the row with the deleted field status true, i have to show that row in red color. Is it possible in GridDataboundGrid? Can you help on this? thanks M. Rabeek

1 Reply

Administrator July 20, 2004 12:56 PM UTC

You have to handle PrepareviewStyleInfo to do this. Here is a KB link that discusses this. http://www.syncfusion.com/Support/article.aspx?id=561 Instead of just setting it when e.RowIndex == 8 as in the KB sample code, you would test your value at that point, and conditionally set the color depending upon the value.
Loader.
Live Chat Icon For mobile
Up arrow icon