wpfxamlinfragistics

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


On the picture below the record selector arrow is displayed on the left of the record index:

enter image description here

I tryed to set the RecordSelectorLocation property of the XamDataGrid control to None

XamDataGrid.FieldLayoutSettings.RecordSelectorLocation = RecordSelectorLocation.None; 

In this case the record number is disappearing too, but I would like to display it.

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


Solution

  • With compliments to Infragistics support the following solution was suggested.

    In order to hide the record selector arrow of the XamDataGrid without hiding the record index it is recommended to re-template the RecordSelector element to only include the record numbering element. The following style and template can be used to achieve this:

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