$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Windows Forms PivotGrid Control
Create interactive user interface of Pivot table, build summarizations and highlight specific data
Home > WinForms UI Controls > User Manual > Report Filtering for PivotGrid in C#

PivotGrid Reports Filtering in C#.NET

The filtering functionality is able to filter data items to be displayed in the reports which are created by the KetticPivotGrid control in C# Windows Forms applications. This feature will help the users of your application to view a report containing the records that has common properties. KetticPivotGrid control will perform the report filtering before calculating the aggregated information. In this article, we are going through the procedures of applying report filtering to KetticPivotGrid.

Enable the Report Filters in KetticPivotGrid in C#.NET

The default setting hides the report filters, so we need to show the report filters elements in the report filters area. The simple C# code snippet below shows how to display the report filters.

this.ketticPivotGrid1.DisplayFilterArea = true;
After enabling the filtering functionality to KetticPivotGrid in your application, the end users are able to add and delete report filters via dragging and dropping or using the KetticPivotFieldList. When they want to add filter conditions to the reports, they can use the filter menu on the filter descriptor elements and then choose items from the list box or applying the filtering functions, like Less, More, Equals, Contains, Between, and more.

Customize Filter Description to Report in C#.NET

KetticPivotGrid control place the Report filter descriptions in the FilterDescriptions collection. We are able to edit the contents of the FilterDescriptions collection both at design time and at run time. To do that at design time, we can use the smart tag of KetticPivotGrid control. To edit the contents at run time, we shall use the PropertyFilterDescription instances of the collection to specify the field for filtering. The C# code below shows how to achieve this.

PropertyFilterDescription description = new PropertyFilterDescription();
ComparisonCondition condition = new ComparisonCondition();

condition.Condition = Comparison.Equals;
condition.Than = "U.S.";

description.PropertyName = "CustomerCity";
description.Condition = condition;
description.CustomName = "City";

And then, we can use the Condition property included in PropertyFilterDescription to store the conditions as well as include or exclude specific values to filter report.

SetCondition setCondition = new SetCondition();

setCondition.Comparison = SetComparison.Includes;
setCondition.Items.Add("New York");
setCondition.Items.Add("Washington DC");
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls