I am using Telerik Radgridview to display some data.
In that, if a integer column [answer_key] is set to 1, the data trigger should set the column to some background color and by default the colour is set. But the data trigger is not triggering at all.
xaml:
<telerik:GridViewDataColumn Header="Answer" Width="320" MinWidth="50" IsFilterable="False" IsGroupable="False">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Label Content="{Binding answer,StringFormat=N2}" Height="30" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
<telerik:GridViewColumn.Style>
<Style TargetType="telerik:GridViewDataColumn">
<Setter Property="Background" Value="LightGray"/>
<Style.Triggers>
<DataTrigger Binding="{Binding answer_key}" Value="1">
<Setter Property="Background" Value="GreenYellow"/>
</DataTrigger>
</Style.Triggers>
</Style>
</telerik:GridViewColumn.Style>
</telerik:GridViewDataColumn>
Please suggest.
Comments
Post a Comment