6 Answers, 1 is accepted
You may take a look at this forum thread for a reference. Let me know if it helps.
Maya
the Telerik team
Charles
The style defined in the sample project is set implicitly thus it is applied to the whole grid. However, once you set its Key property, it will be applied only to those columns that explicitly set it as their CellStyle.
For example:
<Style TargetType="telerik:GridViewCell" x:Key="CellStyle"> <Setter Property="Template" Value="{StaticResource GridViewCellTemplate}"/> <Setter Property="Padding" Value="5,0,3,0"/> ...</Style><telerik:GridViewDataColumn DataMemberBinding="{Binding Property1}"
CellStyle="{StaticResource CellStyle}" />Thus this style will be applied only to that particular column.
All the best,
Maya
the Telerik team
This is my XAML.
<Style x:Key="CellStyle" TargetType="telerik:GridViewCell">
<Setter Property="Template" Value="{StaticResource GridViewCellTemplate}"/>
<Setter Property="Padding" Value="5,0,3,0"/>
<Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
<Setter Property="BorderThickness" Value="0,0,10,0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Background" Value="Transparent"/>
</Style>
<
g:GridViewDataColumn DataMemberBinding="{Binding Environment, Mode=TwoWay}" x:Name="Environment" Header="Environment" HeaderCellStyle="{StaticResource OveralWeightingCellStyle}" CellStyle="{StaticResource CellStyle}"/>