$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 > Local Data Source for PivotGrid in C#

LocalDataSourceProvider of KetticPivotGrid Control in C#.NET

KetticPivotGrid control is capable of the data provider, LocalDataSourceProvider, which can also be used by the KetticPivotFieldList. This local data source provider allows the PivotGrid control access the data source locally, like an IList of instances in a C# classes defined by the users. Furthermore, we are able to use all the collections that implements IEnumerable interface as a LocalDataSourceProvider. In this tutorial, we shall go through the way of using the LocalDataSourceProvider in C#.NET.

Create LocalDataSourceProvider for KetticPivotGrid

The C# code snippet below demonstrates how to create a LocalDataSourceProvider for KetticPivotGrid control for Windows Forms. To display any data in KetticPivotGrid, we should set the ItemSource property to a collection implementing IEnumerable interface or a DataTable as the data source.

LocalDataSourceProvider dataProvider = new LocalDataSourceProvider();
dataProvider.ItemsSource = dataset.Orders;

Add Group Descriptions Collections to LocalDataSourceProvider

KetticPivotGrid WinForms control contains a few different description collections to store data for the LocalDataSourceProvider to display, such as RowGroupDescription, ColumnGroupDescription, AggregateDescriptions, and FilterDescriptions collections.
  • RowGroupDescription collection, this row description collection stores the data that will be displayed as row headers of KetticPivotGrid and KetticPivotFieldList. The users are able to set the properties like PropertyGroupDescription, DateTimeGroupDescription, and DoubleGroupDescription as well as custom implementation of PropertyGroupDescriptionBase C# class. The C# code below demonstrates how to define the RowGroupDescription collection.
  • ColumnGroupDescription collection, this row description collection stores the data that will be displayed as columns headers of KetticPivotGrid and KetticPivotFieldList. The users are able to set the properties like PropertyGroupDescription, DateTimeGroupDescription, and DoubleGroupDescription as well as custom implementation of PropertyGroupDescriptionBase C# class. The C# code below demonstrates how to define the ColumnGroupDescriptions collection in C#.NET template project.
  • AggregateDescriptions collection, this aggregated description collection stores the data that will be aggregated and included in the cells of KetticPivotGrid ontrol. The users are able to set the property PropertyAggregateDescription or create a custom implementation of PropertyAggregateDescriptionBase C# class. The C# code below shows how to define the AggregateDescriptions collection in C#.NET template project.
  • FilterDescriptions collection, this aggregated description collection stores the data that will filtered and the results will be included in KetticPivotGrid control. The users are able to set the property PropertyFilterDescription or create a custom implementation of PropertyFilterDescriptionBase C# class. The C# code below shows how to define the FilterDescriptions collection in C#.NET application.

Apply the DataProvider to KetticPivotGrid

The C# code snippet below shows how to apply the data provider that has been defined to the KetticPivotGrid control in .NET Windows application.

this.ketticPivotGrid1.DataProvider = dataProvider;

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