Class GroupColumnDescription
Describes a grouping criterion that is used to group the data in the SfDataGrid.
Inheritance
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
public class GroupColumnDescription : DependencyObject
Remarks
A GroupColumnDescription is added to the GroupColumnDescriptions collection of an SfDataGrid to specify how records should be grouped. You can provide the ColumnName, an optional Comparer, SortGroupRecords flag, and a custom grouping key converter to customize the grouping behavior.
Constructors
GroupColumnDescription()
Declaration
public GroupColumnDescription()
Fields
ColumnNameProperty
Identifies the ColumnName dependency property.
Declaration
public static readonly DependencyProperty ColumnNameProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the ColumnName dependency property.
ComparerProperty
Identifies the Comparer dependency property.
Declaration
public static readonly DependencyProperty ComparerProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the Comparer dependency property.
ConverterProperty
Identifies the Converter dependency property.
Declaration
public static readonly DependencyProperty ConverterProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the Converter dependency property.
SortGroupRecordsProperty
Identifies the SortGroupRecords dependency property.
Declaration
public static readonly DependencyProperty SortGroupRecordsProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the SortGroupRecords dependency property.
Properties
ColumnName
Gets or sets the name of the column that is used to group the data.
Declaration
public string ColumnName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | A string that specifies the name of the column. The default value is an empty string. |
Comparer
Gets or sets the comparer used to order the resulting groups when applying grouping based on custom logic.
Declaration
public IComparer<object> Comparer { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IComparer<System.Object> | An System.Collections.Generic.IComparer<T> that orders the groups created for this column. The default value is null. |
Remarks
When Comparer is null, the default ordering of the underlying data source is used.
Converter
Gets or sets the value converter used to compute the group key when applying custom grouping.
Declaration
public IValueConverter Converter { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Data.IValueConverter | An System.Windows.Data.IValueConverter that produces the group key for a record. The default value is null. |
Remarks
Use Converter when the group key should be derived from a converted value of the underlying column rather than the raw value.
SortGroupRecords
Gets or sets a value that indicates whether the inner records of a group are sorted when using custom grouping.
Declaration
public bool SortGroupRecords { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true if the records inside each group are sorted; otherwise, false. The default value is false. |
Remarks
By default, the records inside a group are not sorted because the values for a given group key are typically the same, and only the group keys are sorted. When using custom grouping, the records inside a group can have different values, so setting SortGroupRecords to true will sort the records within each group.