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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

row background color based on ds criteria

Thread ID:

Created:

Updated:

Platform:

Replies:

26289 Mar 18,2005 03:57 PM UTC Mar 19,2005 01:32 AM UTC Windows Forms 3
loading
Tags: GridControl
Faraz Haque
Asked On March 18, 2005 03:57 PM UTC

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?

Administrator [Syncfusion]
Replied On March 18, 2005 04:16 PM UTC

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.

Faraz Haque
Replied On March 19, 2005 12:02 AM UTC

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.

Administrator [Syncfusion]
Replied On March 19, 2005 01:32 AM UTC

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;