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 background color based on ds criteria

Is there a way to set the background of a row in a datagrid based on a criteria in the datasource at runtime? Let say, i want to color all rows with "updated" column value = true to blue. How can I accomplish this?

3 Replies

AD Administrator Syncfusion Team March 18, 2005 11:16 AM

Here is a KB discussing how to go about this. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=84&catId=11 In your PrepareViewStyleInfo, you would need to check your criteria based on e.RowIndex and e.ColIndex, and then conditionally set e.Style.BackColor.


FH Faraz Haque March 18, 2005 07:02 PM

Thanks..thats works for me.. Does the same apply to grouping grid? >Here is a KB discussing how to go about this. >http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=84&catId=11 > >In your PrepareViewStyleInfo, you would need to check your criteria based on e.RowIndex and e.ColIndex, and then conditionally set e.Style.BackColor.


AD Administrator Syncfusion Team March 18, 2005 08:32 PM

With a groupinggrid, you can probably use ConditionalFormats. These are discussed in this forum thread. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=19910

Loader.
Live Chat Icon For mobile
Up arrow icon