Edit this page

Group Filters

Group filtering allows you to add filter conditions to the group descriptions. These conditions specify which of the generated groups will be displayed. There are two types of group filters: Label filters and Value filters. The Label filters apply a specified filter function to the name of the generated groups whereas the Value filters apply a filter function to the GrandTotal value of a given aggregate field for that group.

Figure 1: Group Filters

pivotgrid-filtering-group-filters 001

Group filtering is enabled by default. To enable or disable it use the following property:


this.radPivotGrid1.AllowGroupFiltering = true;

Me.radPivotGrid1.AllowGroupFiltering = True

The end-user can apply group filters using the filter button in the group descriptor elements or via the drop-down menus of the group fields in RadPivotFieldList. The filtering options are similar to the options of the Report Filters with the addition of the Top10 value filters. The Top10 filters allow you to select only the top/bottom groups from the order sorted by a given group value.

Adding a Group Filter Description

Group filters can be applied to group descriptions by using their GroupFilter property as demonstrated in the following code snippet:

PropertyGroupDescriptionBase description = (PropertyGroupDescriptionBase)this.radPivotGrid1.RowGroupDescriptions[0];
LabelGroupFilter filter = new LabelGroupFilter();
ComparisonCondition condition = new ComparisonCondition();
condition.Condition = Telerik.Pivot.Core.Filtering.Comparison.Equals;
condition.Than = "UK"; 
filter.Condition = condition; 
description.GroupFilter = filter;

Dim description As PropertyGroupDescriptionBase = Me.radPivotGrid1.RowGroupDescriptions(0)
Dim filter As New LabelGroupFilter()
Dim condition As New ComparisonCondition()
condition.Condition = Telerik.Pivot.Core.Filtering.Comparison.Equals
condition.Than = "UK"
filter.Condition = condition

See Also