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 ?
ADAdministrator Syncfusion Team 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.