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.

row background color based on ds criteria

Thread ID:

Created:

Updated:

Platform:

Replies:

26289 Mar 18,2005 10:57 AM Mar 18,2005 08:32 PM Windows Forms 3
loading
Tags: GridControl
Faraz Haque
Asked On March 18, 2005 10:57 AM

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 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.

Faraz Haque
Replied On 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.

Administrator [Syncfusion]
Replied On 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

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.

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.

;