Version

Changing the Record Orientation

The xamDataPresenter’s™ Grid View shows Records in either vertical (default) or horizontal orientation. To show records in horizontal orientation, set the Orientation property off the GridViewSettings.

The following procedure assumes you have a data bound xamDataPresenter that you want to change the orientation on. For more information, see Adding xamDataPresenter to Your Application.

Follow these steps to display Grid View’s Records horizontally.

  1. The following XAML creates an instance of XamDataPresenter’s Grid View and names it. The XAML then defines a ViewSettings object off the GridView and a GridViewSettings object (derived from ViewSettings), enabling you to set the Orientation property.

In XAML:

<igDP:XamDataPresenter x:Name="XamDataPresenter1"
  ...
  >
        <igDP:XamDataPresenter.View>
                <igDP:GridView>
                        <igDP:GridView.ViewSettings>
                                <igDP:GridViewSettings Orientation="Horizontal" />
                        </igDP:GridView.ViewSettings>
                </igDP:GridView>
        </igDP:XamDataPresenter.View>
</igDP:XamDataPresenter>
  1. Build and run the project. You should see the Grid View displaying in a horizontal orientation similar to the image below.

changing the record orientation in xamdatapresenter