2

我想用RadGridView 粗体做一些行;我已经设置

<telerik:RadGridView.RowStyle>
   <Style TargetType="telerik:GridViewRow">
      <Setter Property="FontWeight" Value="{Binding RowFontWeight}" />
   </Style>
</telerik:RadGridView.RowStyle>

ItemsSource对象中我设置了RowFontWeight值,但它不起作用

4

1 回答 1

1

我认为您RowFontWeight在数据网格行中无法访问DataContext;我过去使用过这种风格,对我来说效果很好;

我附上了一个telerik示例,我通过RowFontWeight在模型类(Club.csPlayer.cs)中添加一个属性并将您的样式添加到数据网格中来修改了这个示例;它工作正常,父网格行变粗,而在子网格中它们变亮。

在此处输入图像描述

下载样本

于 2012-06-27T12:34:26.010 回答