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.

DataBoundGrid - Changing the Style of a specific row

Thread ID:

Created:

Updated:

Platform:

Replies:

23511 Jan 13,2005 09:55 AM Jan 13,2005 10:02 AM Windows Forms 1
loading
Tags: GridControl
Spencer Robinson
Asked On January 13, 2005 09:55 AM

I''m trying to change the style of the entire row...If I have the Row index (from an event) how can I change the style of that particular row? Thanks, any help is appreciated

Administrator [Syncfusion]
Replied On January 13, 2005 10:02 AM

In a GridDataboundGrid, there is no property settings that you can use to ''set'' the backcolor of a row. Instead, you have to handle an event (PrepareViewStyleInfo), and in your handler, dynamically provide the color if e.RowIndex points to a row that you want to see have a specific color. So, if you have an event or something else that lets you know that row 5 should be blue, then what you have to do is to save the fact that row 5 should be blue in some manner. Then in your PrepareViewStyleInfo handler, you check e.RowIndex to see if it should be colored from your cache of row color information, and if so, you set e.Style.BackColor. See this KB link. http://64.78.18.34/Support/article.aspx?id=561

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.

;