alexa
menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class GroupColumnDescription

    Describes a grouping criterion that is used to group the data in the SfDataGrid.

    Inheritance
    System.Object
    GroupColumnDescription
    Namespace: Syncfusion.UI.Xaml.DataGrid
    Assembly: Syncfusion.Grid.WinUI.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
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ColumnName dependency property.

    ComparerProperty

    Identifies the Comparer dependency property.

    Declaration
    public static readonly DependencyProperty ComparerProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the Comparer dependency property.

    KeySelectorProperty

    Identifies the KeySelector dependency property.

    Declaration
    public static readonly DependencyProperty KeySelectorProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the KeySelector dependency property.

    SortGroupRecordsProperty

    Identifies the SortGroupRecords dependency property.

    Declaration
    public static readonly DependencyProperty SortGroupRecordsProperty
    Field Value
    Type
    Microsoft.UI.Xaml.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<> 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.

    KeySelector

    Gets or sets the KeySelector 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 KeySelector for custom grouping. The default value is null.

    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.

    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved