New to Telerik UI for WPFStart a free 30-day trial

Allows grouping by a lambda expression.

Definition

Constructors

C#
public GroupDescriptor()

Fields

GroupingExpressionProperty

DependencyProperty

Identifies the GroupingExpression dependency property.

C#
public static readonly DependencyProperty GroupingExpressionProperty

Identifies the GroupSortingExpression dependency property.

C#
public static readonly DependencyProperty GroupSortingExpressionProperty

Properties

Gets or sets the grouping predicate.

C#
public Expression<Func<TElement, TKey>> GroupingExpression { get; set; }
Property Value:

The grouping predicate.

GroupSortingExpression

Expression<Func<IGrouping<TKey, TElement>, TSortingKey>>

Gets or sets the grouping and sorting predicate.

C#
public Expression<Func<IGrouping<TKey, TElement>, TSortingKey>> GroupSortingExpression { get; set; }
Property Value:

The grouping and sorting predicate.

Methods

Creates a group expression that returns the grouping key for each item in a collection.

C#
protected override Expression CreateGroupKeyExpression(ParameterExpression parameterExpression)
Parameters:parameterExpressionParameterExpression

The parameter expression, which will be used for grouping.

Returns:

Expression

Expression that creates group key for the given item.

Overrides: GroupDescriptorBase.CreateGroupKeyExpression(ParameterExpression)

Creates sorting key expression that sorts the groups created from this descriptor using the group's key.

C#
public override Expression CreateGroupSortExpression(Expression groupingExpression)
Parameters:groupingExpressionExpression

The grouping expression, which represents the grouped items created from the CreateGroupKeyExpression(Expression).

Returns:

Expression

Expression that represents the sort criteria for each group.

Overrides: GroupDescriptorBase.CreateGroupSortExpression(Expression)