Class ColumnGroupDescription
The ColumnGroupDescription class introduced to set the comparer value in the GrupColumnDesription. While we can add the comparer into the view through the ColumnGroupDescription. Describes the Grouping of Items using the ColumnName, Comparer and Converter as Criteria.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Data
Assembly: Syncfusion.Maui.Data.dll
Syntax
public class ColumnGroupDescription : PropertyGroupDescription, INotifyPropertyChanged
Constructors
ColumnGroupDescription(String, IValueConverter, IComparer<Object>)
Initializes a new instance of the ColumnGroupDescription class.
Declaration
public ColumnGroupDescription(string propertyName, IValueConverter converter, IComparer<object> comparer)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property name which is to be grouped. |
Microsoft.Maui.Controls.IValueConverter | converter | The custom converter for applying custom grouping logic. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer to sort the group key value. |
ColumnGroupDescription(String, IValueConverter, IComparer<Object>, Func<String, Object, Object>)
Initializes a new instance of the ColumnGroupDescription class.
Declaration
public ColumnGroupDescription(string propertyName, IValueConverter converter, IComparer<object> comparer, Func<string, object, object> keyselector)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property name which is to be grouped. |
Microsoft.Maui.Controls.IValueConverter | converter | The custom converter for applying custom grouping logic. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer to sort the group key value. |
System.Func<System.String, System.Object, System.Object> | keyselector | Keyselector for Custom Grouping |
Properties
Comparer
Gets or sets the Comparer value to sort the GroupKey value.
Declaration
public IComparer<object> Comparer { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IComparer<System.Object> | The Comparer value to sort the GroupKey value. |
KeySelector
Get or set the KeySeletor for custom grouping.
Declaration
public Func<string, object, object> KeySelector { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.String, System.Object, System.Object> | The KeySeletor for custom grouping. |
SortGroupRecords
Gets or sets the value that indicates whether to sort the inner records of group while using custom grouping.
Declaration
public bool SortGroupRecords { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false. |
Remarks
By default, grouped columns records are not sorted as the values of all the records in one group will be same. So, only groups will be sorted based on group key. In custom grouping cases, grouped columns records value may differ. So in this case, you can sort the records of group by setting SortGroupRecords property to true.