Version

Disable Sorting

The xamDataPresenter’s™ Grid View sorts data when the end user clicks a Field's header. To prevent your end users from sorting data in the Grid View, set the LabelClickAction property off the FieldSettings.

The following procedure assumes you have a data bound xamDataPresenter, and you want do disable sorting in it. For more information, see Adding xamDataPresenter to Your Application.

  1. Create an instance of XamDataPresenter and name it. Specify a FieldSettings object off of which you can set the LabelClickAction to Nothing.

In XAML:

<igDP:XamDataPresenter x:Name="XamDataPresenter1"
  ...
  >
    <igDP:XamDataPresenter.View>
        <igDP:GridView/>
    </igDP:XamDataPresenter.View>
    <igDP:XamDataPresenter.FieldSettings>
        <igDP:FieldSettings LabelClickAction="Nothing" />
    </igDP:XamDataPresenter.FieldSettings>
</igDP:XamDataPresenter>
  1. Build and run the project. The Grid View does not sort when you click on a Field’s header.