Hey,
I've recently updated the telerik controls from 2010Q3 to 2011 Q1. In my project I bind the cellstyleselector property of the gridviewdatacolumn to a class (the reference is set in the resources)... I do this by
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Path=XYZ}"
Header
=
"ABC"
CellStyleSelector
=
"{StaticResource myStyle}"
IsReadOnly
=
"True"
/>
where myStyle is more or less this:
public
static
void
SetStyle(DependencyObject container,
decimal
limit, ThresholdSettings _val)
{
if
(limit >= (
decimal
)_val.TopValue)
{
container.SetValue(GridViewCell.BackgroundProperty, StringToColor.Convert(_val.FirstColor));
}
else
{
if
(limit <= (
decimal
)_val.BottomValue)
container.SetValue(GridViewCell.BackgroundProperty, StringToColor.Convert(_val.ThirdColor));
else
container.SetValue(GridViewCell.BackgroundProperty, StringToColor.Convert(_val.SecondColor));
}
}
Before the update everything works fine and the background of the cells where green, yellow or red. But now nothing is coloured... Do you have an idea why an how to solve this problem???