Class GroupDescription
Describes a grouping operation applied to TableView items. Extends SortDescription since grouping and sorting share the same "extract a value, then order/compare by it" shape - a group's own items, and the groups themselves, are ordered using this description's Direction and Comparer.
public class GroupDescription : SortDescription
- Inheritance
-
objectGroupDescription
- Inherited Members
Constructors
GroupDescription(string?, SortDirection, IComparer?, Func<object?, object?>?)
Initializes a new instance of the GroupDescription class.
public GroupDescription(string? propertyName, SortDirection direction = SortDirection.Ascending, IComparer? comparer = null, Func<object?, object?>? valueDelegate = null)
Parameters
propertyNamestringThe name of the property to group by.
directionSortDirectionThe direction groups are ordered in.
comparerIComparerAn optional comparer to use for ordering groups.
valueDelegateFunc<object, object>An optional delegate to extract the value to group by.
Properties
SortMode
Gets or sets what groups at this level are ordered by - their key value (default) or the number of items they contain. Direction still controls ascending/descending of whichever this is set to.
public GroupSortMode SortMode { get; set; }