This is a migrated thread and some comments may be shown as answers.

Losing background/foreground colors in a cell

1 Answer 86 Views
GridView
This is a migrated thread and some comments may be shown as answers.
GEB
Top achievements
Rank 1
GEB asked on 03 Mar 2009, 08:00 AM
I believe that this is a bug in the RadGridView.  Here is how to reproduce:

1. Freeze the first two columns in a RadGridView
2. Change the background/foreground colors of some of the cells in either of the first two columns via code-behind.
3. Move the freeze bar to the left, unfreezing the two columns.
4. Move the freeze bar back to the right, freezing the columns again.

At this point, the colors in the cells that were initially set in the code behind are lost.  Note that only a few of the rows had colors set, and I actually set these colors via DragAndDrop in the code-behind.  I don't believe that DragAndDrop has anything to do with this issue.  It is just the mechanism my application uses to set the colors of some cells.

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 03 Mar 2009, 12:54 PM
Hi GEB,

Colors are lost because whenever you freeze/unfreeze columns all cells are recreated. My colleague Hristo Deshev has posted a solution to a similar problem here that could help you workaround the color loss issue.
Similarly to what Hristo Deshev has suggested, you can create a property that indicates which cell has a modified color and bind to that property a template. That way the cell colors will not be cleared when you freeze/unfreeze.

Kind regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
GEB
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or