Hello,
I am using a telerik:RadGridView with is bound to a collection.
In a column of have the following CellStyleSelector
<telerik:GridViewDataColumn.CellStyleSelector>
<telerik:ConditionalStyleSelector>
<telerik:StyleRule Condition="Name= 'N/A'">
<telerik:StyleRule.Style>
<Style TargetType="telerik:GridViewCell">
<Setter Property="IsEnabled" Value="False" />
</Style>
</telerik:StyleRule.Style>
</telerik:StyleRule>
</telerik:ConditionalStyleSelector>
</telerik:GridViewDataColumn.CellStyleSelector>
This works perfectly for me. However I want this CellStyleSelector on every column expect the Name column.
Is it possible to add a CellStyleSelector as a XAML resource so I can reuse it.
e.g
<telerik:GridViewDataColumn CellStyleSelector="{StaticResource MySelector}" Name="colage" Width="50" Header="Age" DataMemberBinding="{Binding Age, Mode=TwoWay}" />
I am aware I could create a style selector class but i would prefer to keep it all in the XAML
I am using a telerik:RadGridView with is bound to a collection.
In a column of have the following CellStyleSelector
<telerik:GridViewDataColumn.CellStyleSelector>
<telerik:ConditionalStyleSelector>
<telerik:StyleRule Condition="Name= 'N/A'">
<telerik:StyleRule.Style>
<Style TargetType="telerik:GridViewCell">
<Setter Property="IsEnabled" Value="False" />
</Style>
</telerik:StyleRule.Style>
</telerik:StyleRule>
</telerik:ConditionalStyleSelector>
</telerik:GridViewDataColumn.CellStyleSelector>
This works perfectly for me. However I want this CellStyleSelector on every column expect the Name column.
Is it possible to add a CellStyleSelector as a XAML resource so I can reuse it.
e.g
<telerik:GridViewDataColumn CellStyleSelector="{StaticResource MySelector}" Name="colage" Width="50" Header="Age" DataMemberBinding="{Binding Age, Mode=TwoWay}" />
I am aware I could create a style selector class but i would prefer to keep it all in the XAML