Version

Configuring Initial Sort Order

Topic Overview

Purpose

This topic provides an overview about setting initial sort order on the WinGrid™ columns.

Choosing Initial Sort Order

Overview

This feature provides the user with the option of applying a predefined sort order upon their first interaction. In some cases the initial order; when the user clicks on the column header first time; is essential for the user’s preference on how to present the order of the data, and therefore we added a property of type SortDirection Enum called InitialSortDirection, which by defaults is in Ascending order, can be used to choose initial sort order. This property is added to UltraGridOverride class and to UltraGridColumn class in order to allow developers to choose a sort order for all columns as well as by column level.

Available options for initial sort order are:

  • Ascending

  • Default ( Ascending )

  • Descending

The following example applies to all columns, meaning clicking on any of the column header first time; the columns will be sorted in Ascending order.

In C#:

ultraGrid1.DisplayLayout.Override.InitialSortDirection = SortDirection.Ascending;

In Visual Basic:

ultraGrid1.DisplayLayout.Override.InitialSortDirection = SortDirection.Ascending

The following example applies to a specific column.

In C#:

ultraGrid1.DisplayLayout.Bands[0].Columns[2].InitialSortDirection = SortDirection.Ascending;

In Visual Basic:

ultraGrid1.DisplayLayout.Bands(0).Columns(2).InitialSortDirection = SortDirection.Ascending

Related Content

Topics

The following topic provides additional information related to this topic.

Topic Purpose

This section provides direct links to

.