【问题标题】:How to hide the record selector arrow of the XamDataGrid without hiding the record index?如何在不隐藏记录索引的情况下隐藏 XamDataGrid 的记录选择器箭头?
【发布时间】:2018-05-02 08:46:14
【问题描述】:

在下图中,记录选择器箭头显示在记录索引的左侧:

我尝试将 XamDataGrid 控件的 RecordSelectorLocation 属性设置为 None

XamDataGrid.FieldLayoutSettings.RecordSelectorLocation = RecordSelectorLocation.None; 

在这种情况下,记录号也消失了,但我想显示它。

如何在不隐藏记录索引的情况下隐藏 XamDataGrid 的记录选择器箭头?

【问题讨论】:

    标签: wpf xaml infragistics


    【解决方案1】:

    对 Infragistics 的支持提出了以下建议。

    为了隐藏 XamDataGrid 的记录选择器箭头而不隐藏记录索引,建议将 RecordSelector 元素重新模板化为仅包含记录编号元素。可以使用以下样式和模板来实现:

    <Style TargetType="{x:Type igDP:RecordSelector}">
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate>
            <igDP:RecordSelectorNumber HorizontalAlignment="Center" VerticalAlignment="Center" />
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    

    【讨论】:

      猜你喜欢
      • 2013-11-20
      • 1970-01-01
      • 1970-01-01
      • 2021-09-28
      • 2015-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多