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

Color-coded (in background) & disabled cells tend to lose their color

3 Answers 56 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sunggoo Im
Top achievements
Rank 1
Sunggoo Im asked on 24 Jul 2010, 01:00 AM

Hi,

I am using Telerik's Silverlight Gridview control to implement an Excel-like form.

It is required to have some color-coding (both cell basis and row basis) depending on some other column values.

I have used RowLoaded and CellEditEnded events to color-code either rows or cells respectively. Color-coding seems to be working find.

However, when a color-coded row (or a cell) is selected then de-selected, background color seems to disappear.

Same thing happend for disabled rows and cells. But in these cases, disabled were still functionally disabled although they looked like normal rows and cells.

Please take a look into this.

Thank you in advance,

Sunggoo.

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 24 Jul 2010, 01:08 PM
Hi Sunggoo Im,

The proper way to do this is called conditional formatting. You can see an example here. Check out the other examples under the "Conditional Styling" group as well. I hope this helps.

Best wishes,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
normalham2
Top achievements
Rank 1
answered on 28 Jul 2010, 07:47 PM

I'm having the same problem.  I notice in the demo, when you change the price of a red cell to a lower price that should turn the cell white, it does not change.  I'm actually working in the RadTreeListView but was hoping to find some answers here.  There is a Background property within the XAML of the GridViewDataColumn, is there any way twoway binding could work on this property.  I've spent a few hours trying to get it to work as this would be a very simple solution for me to be able to bind the Background property to my view model.  I've tried binding in to Color, Brushes, and strings, but the property is never access from my view model or the background changed.

For me, since I'm in the RadTreeListView, changing a value of the parent can affect several child row backgrounds.

In summary, if there is any way to get the binding of the Background property to work via view model, that would be wonderful.

Thanks,
Todd
0
Vlad
Telerik team
answered on 29 Jul 2010, 06:53 AM
Hello Todd,

 I believe you can do that the old way with IValueConverter however you may need to use custom templates to plug this. Please check this blog post for more info.

Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Sunggoo Im
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
normalham2
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or