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

How to hide the record selector arrow of the XamDataGrid without hiding the record index?

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

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

XamDataGrid.FieldLayoutSettings.RecordSelectorLocation = RecordSelectorLocation.None; 

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

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

感谢 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>