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 - how to preserve selected rows when binding context position changes

Thread ID:

Created:

Updated:

Platform:

Replies:

6064 Jul 30,2003 03:14 AM Jul 30,2003 04:00 AM Windows Forms 1
loading
Tags: GridControl
Alexander Arlievsky
Asked On July 30, 2003 03:14 AM

Hi, We are using data bound grid, and we've implemented sort of "multiple selection" - several rows can be selected, and they are painted with different colors. Grid is bounded to dataset, and when current position in binding context changes, grid "forgets" what prevuously was selected. We need to keep those rows selected. What is the best way to do it ? Alex.

Administrator [Syncfusion]
Replied On July 30, 2003 04:00 AM

You would have to provide these colors dynamically in PrepareViewStyleInfo. In the handler, if e.RowIndex is points to a row you want colored, and if e.ColIndex > 0, then set e.Style.BackColor to the desired color. So, you would have to maintain a list of colored rows, and the color for each of the rows, and use this in PrepareViewStyleInfo to provide the proper color based on e.RowIndex.

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.

;