Specifies row sorting settings in GridControl .

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

Syntax

C#
public class GridControlSortingSettings
Visual Basic
Public Class GridControlSortingSettings
Visual C++
public ref class GridControlSortingSettings
F#
type GridControlSortingSettings =  class end

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();

Inheritance Hierarchy

System..::..Object
  Dapfor.Wpf.Controls..::..GridControl..::..GridControlSortingSettings

See Also