Gets the sorting settings.

Namespace: Dapfor.Wpf.Controls
Assembly: Dapfor.Wpf (in Dapfor.Wpf.dll) Version: 4.1.0.26317 (4.1.0.26317)

Syntax

C#
public GridControl..::..GridControlSortingSettings SettingsSorting { get; }
Visual Basic
Public ReadOnly Property SettingsSorting As GridControl..::..GridControlSortingSettings
	Get
Visual C++
public:
property GridControl..::..GridControlSortingSettings^ SettingsSorting {
	GridControl..::..GridControlSortingSettings^ get ();
}
F#
member SettingsSorting : GridControl..::..GridControlSortingSettings with get

Property Value

Type: GridControl..::..GridControlSortingSettings
Sorting settings.

Remarks

Data sorting is defined and set in Header class. Dapfor's framework provides a simple and intuitive interface for this purpose. This interface enables provides an easy way to manage sorting, including multiple sorting. To sort data by one or several columns, a programmer just has to set Column.SortDirection to one of SortDirection values. Sorting sequence for different columns defines their levels during multiple sorting. The most frequent methods of sorting management in code are shown below.

 Copy imageCopy
Header header = grid.Headers[0]; 
Column column1 = header["Column1"]; 
Column column2 = header["Column2"]; 

//Sort by the first column 
column1.SortDirection = SortDirection.Ascending; 

//Turn on the multiple sort by the second column 
column2.SortDirection = SortDirection.Descending; 

//Enumerate all sorted columns 
foreach (Column column in header.SortedColumns) 
{ 
    //Some code here... 
} 

//Clear the sort 
header.SortedColumns.Clear();

See Also