Xceed DataGrid for WPF v7.2 Documentation
SortDirectionCycle Property
Example 


Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > ColumnBase Class : SortDirectionCycle Property
Gets or sets the sort directions through which the column will cycle when its associated column-manager cell or group-by item is pressed.
Syntax
'Declaration
 
Public Property SortDirectionCycle As SortDirectionCycleCollection
'Usage
 
Dim instance As ColumnBase

Dim value As SortDirectionCycleCollection

 

instance.SortDirectionCycle = value

 

value = instance.SortDirectionCycle
public SortDirectionCycleCollection SortDirectionCycle {get; set;}

Property Value

A SortDirectionCycleCollection containing the sort directions through which the column will cycle when its associated column-manager cell or group-by item is pressed.

By default, this property is set to a read-only collection that will cycle through the Ascending, Descending, and None sort directions. To change the cycle, a new collection must be set.

Remarks
Duplicate values cannot be added to the collection.
Example
The following example demonstrates how to define a sort-direction cycle collection that will cycle through None, Descending, Ascending, None, Desceding, and so on.This example demonstrates how to define a sort-direction cycle collection that will cycle through None, Descending, Ascending, Desceding, Ascending and so on. Notice that "None" will not be repeated.
<xcdg:Column ...>

  <xcdg:Column.SortDirectionCycle>

    <xcdg:SortDirectionOrderCollection>

      <xcdg:SortDirection>Descending</xcdg:SortDirection>

      <xcdg:SortDirection>Ascending</xcdg:SortDirection>

      <xcdg:SortDirection>None</xcdg:SortDirection>

    </xcdg:SortDirectionOrderCollection>

  </xcdg:Column.SortDirectionCycle >

</xcdg:Column>
<xcdg:Column ...>

  <xcdg:Column.SortDirectionCycle >

    <xcdg:SortDirectionOrderCollection>

      <xcdg:SortDirection>Descending</xcdg:SortDirection>

      <xcdg:SortDirection>Ascending</xcdg:SortDirection>

    </xcdg:SortDirectionOrderCollection>

  </xcdg:Column.SortDirectionCycle >

</xcdg:Column>
Requirements

Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ColumnBase Class
ColumnBase Members