skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class LocalDataSourceProvider

Provides pivot grouping and aggregation operations for local data sources such as IList collections and user-defined class instances. This data provider enables in-memory pivot operations with support for property-based grouping, filtering, aggregation, and drill-down functionality.

Inheritance
System.Object
DataProviderBase
LocalDataSourceProvider
Inherited Members
DataProviderBase.IDataProvider.Refresh()
DataProviderBase.BeginInit()
DataProviderBase.EndInit()
DataProviderBase.Refresh()
DataProviderBase.DeferRefresh()
DataProviderBase.Invalidate()
DataProviderBase.OnStatusChanged(DataProviderStatusChangedEventArgs)
DataProviderBase.OnPrepareDescriptionForField(PrepareDescriptionForFieldEventArgs)
DataProviderBase.OnFieldDescriptionsProviderChanged(IFieldDescriptionProvider, IFieldDescriptionProvider)
DataProviderBase.OnPropertyChanged(String)
DataProviderBase.GetAggregateDescriptionForFieldDescription(IPivotFieldInfo)
DataProviderBase.GetGroupDescriptionForFieldDescription(IPivotFieldInfo)
DataProviderBase.GetFilterDescriptionForFieldDescription(IPivotFieldInfo)
DataProviderBase.FieldInfos
DataProviderBase.DeferUpdates
DataProviderBase.Status
DataProviderBase.AggregatesPosition
DataProviderBase.AggregatesLevel
DataProviderBase.FieldDescriptionsProvider
DataProviderBase.HasPendingChanges
DataProviderBase.Settings
DataProviderBase.IDataProvider.Status
DataProviderBase.IDataProvider.Results
DataProviderBase.IDataProvider.Settings
DataProviderBase.IDataProvider.AggregatesPosition
DataProviderBase.IDataProvider.AggregatesLevel
DataProviderBase.StatusChanged
DataProviderBase.PropertyChanged
DataProviderBase.PrepareDescriptionForField
DataProviderBase.IDataProvider.StatusChanged
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Pivot.Core
Assembly: Telerik.WinControls.PivotGrid.dll

Syntax

public class LocalDataSourceProvider : DataProviderBase, IDataProvider, INotifyPropertyChanged, ISupportInitialize, IAggregateDescriptionsGenerator, IUnderlyingDataProvider, ICultureAwareProvider

Constructors

LocalDataSourceProvider()

Initializes a new instance of the LocalDataSourceProvider class with default pivot engine. Sets up the provider for processing local data sources with in-memory pivot operations and drill-down support.

Declaration
public LocalDataSourceProvider()

Properties

AggregateDescriptions

Gets a collection of LocalAggregateDescription objects that specify how data should be aggregated within the intersection of row and column groups. These define the calculated values displayed in pivot cells using various aggregate functions like Sum, Count, Average, etc.

Declaration
public Collection<LocalAggregateDescription> AggregateDescriptions { get; }
Property Value
System.Collections.ObjectModel.Collection<LocalAggregateDescription>

CalculatedFields

Gets a collection of CalculatedField objects that define calculated aggregate values. Calculated fields allow creating custom expressions and formulas that can be used as aggregate values in the pivot, providing advanced computation capabilities beyond standard aggregate functions.

Declaration
public Collection<CalculatedField> CalculatedFields { get; }
Property Value
System.Collections.ObjectModel.Collection<CalculatedField>

ColumnGroupDescriptions

Gets a collection of PropertyGroupDescriptionBase objects that specify how the pivot data should be grouped by columns. Column groupings create the hierarchical structure displayed at the top of the pivot grid using object properties.

Declaration
public Collection<PropertyGroupDescriptionBase> ColumnGroupDescriptions { get; }
Property Value
System.Collections.ObjectModel.Collection<PropertyGroupDescriptionBase>

Culture

Gets or sets the System.Globalization.CultureInfo used for grouping, formatting, and sorting operations. This culture affects how data is grouped, displayed, and compared in different locales.

Declaration
public CultureInfo Culture { get; set; }
Property Value
System.Globalization.CultureInfo

EnableHierarchy

Gets or sets a value indicating whether nested properties of objects in the ItemsSource should be displayed in a hierarchical structure. When enabled, complex object properties are shown as expandable tree nodes in the field list.

Declaration
public bool EnableHierarchy { get; set; }
Property Value
System.Boolean

FilterDescriptions

Gets a collection of PropertyFilterDescriptionBase objects that specify how pivot items should be filtered. Filters are applied to restrict which data items are included in pivot calculations and display.

Declaration
public Collection<PropertyFilterDescriptionBase> FilterDescriptions { get; }
Property Value
System.Collections.ObjectModel.Collection<PropertyFilterDescriptionBase>

ItemsSource

Gets or sets the data source for pivot operations. This can be any IEnumerable collection such as IList, Array, ObservableCollection, or other enumerable data sources containing the objects to be analyzed and grouped in the pivot.

Declaration
public object ItemsSource { get; set; }
Property Value
System.Object

Results

Gets the current pivot calculation results containing the processed data from the local data source. This property provides access to the aggregated and grouped data ready for display in pivot controls.

Declaration
protected override IPivotResults Results { get; }
Property Value
IPivotResults

Overrides
DataProviderBase.Results

RowGroupDescriptions

Gets a collection of PropertyGroupDescriptionBase objects that specify how the pivot data should be grouped by rows. Row groupings create the hierarchical structure displayed on the left side of the pivot grid using object properties.

Declaration
public Collection<PropertyGroupDescriptionBase> RowGroupDescriptions { get; }
Property Value
System.Collections.ObjectModel.Collection<PropertyGroupDescriptionBase>

State

Gets the current state object representing the items source for this data provider. This state is used for field description retrieval and data source management.

Declaration
public override object State { get; }
Property Value
System.Object

The ItemsSource object representing the current provider state.

Overrides
DataProviderBase.State

Methods

BlockUntilRefreshCompletes()

Blocks the calling thread until the current refresh operation completes. For local data source provider, this waits for the parallel processing engine to complete all operations.

Declaration
public override void BlockUntilRefreshCompletes()
Overrides
DataProviderBase.BlockUntilRefreshCompletes()

CreateFieldDescriptionsProvider()

Creates a field description provider for retrieving metadata and field information from the local data source. This provider analyzes object properties to discover available fields for pivot operations.

Declaration
protected override IFieldDescriptionProvider CreateFieldDescriptionsProvider()
Returns
IFieldDescriptionProvider

A new LocalDataSourceFieldDescriptionsProvider instance for analyzing the local data source.

Overrides
DataProviderBase.CreateFieldDescriptionsProvider()

GetAggregateDescriptionForFieldDescriptionCore(IPivotFieldInfo)

Creates an aggregate description for the specified field that can be used in local data source pivot operations. The description is configured based on the field type, using appropriate aggregate functions for numeric vs non-numeric data.

Declaration
protected override IAggregateDescription GetAggregateDescriptionForFieldDescriptionCore(IPivotFieldInfo description)
Parameters
IPivotFieldInfo description

The pivot field information to create an aggregate description for.

Returns
IAggregateDescription

A LocalAggregateDescription configured for the specified field.

Overrides
DataProviderBase.GetAggregateDescriptionForFieldDescriptionCore(IPivotFieldInfo)
Exceptions
System.ArgumentNullException

Thrown when description is null.

GetFilterDescriptionForFieldDescriptionCore(IPivotFieldInfo)

Creates a filter description for the specified field that can be used in local data source filtering operations. The description is configured with the field name for property-based filtering.

Declaration
protected override FilterDescription GetFilterDescriptionForFieldDescriptionCore(IPivotFieldInfo description)
Parameters
IPivotFieldInfo description

The pivot field information to create a filter description for.

Returns
FilterDescription

A PropertyFilterDescription configured for the specified field.

Overrides
DataProviderBase.GetFilterDescriptionForFieldDescriptionCore(IPivotFieldInfo)
Exceptions
System.ArgumentNullException

Thrown when description is null.

GetGroupDescriptionForFieldDescriptionCore(IPivotFieldInfo)

Creates a group description for the specified field that can be used in local data source pivot grouping operations. The description type is chosen based on the field data type, supporting numeric ranges, date/time steps, and property grouping.

Declaration
protected override IGroupDescription GetGroupDescriptionForFieldDescriptionCore(IPivotFieldInfo description)
Parameters
IPivotFieldInfo description

The pivot field information to create a group description for.

Returns
IGroupDescription

A PropertyGroupDescriptionBase configured for the specified field type.

Overrides
DataProviderBase.GetGroupDescriptionForFieldDescriptionCore(IPivotFieldInfo)
Exceptions
System.ArgumentNullException

Thrown when description is null.

GetUnderlyingData(IGroup, IGroup)

Extracts the underlying data items for the specified row and column group intersection. This method provides drill-down functionality to access the detailed data behind pivot aggregates.

Declaration
public void GetUnderlyingData(IGroup rowGroup, IGroup columnGroup)
Parameters
IGroup rowGroup

The row group to drill down into, or null for all rows.

IGroup columnGroup

The column group to drill down into, or null for all columns.

Implements
IUnderlyingDataProvider.GetUnderlyingData(IGroup, IGroup)

RefreshOverride()

Performs the core refresh operation by processing the local data source, initializing descriptions, and executing pivot calculations. This method handles field initialization and pivot engine execution.

Declaration
protected override void RefreshOverride()
Overrides
DataProviderBase.RefreshOverride()

Events

GetUnderlyingDataCompleted

Occurs when the underlying data extraction for drill-down operations is completed. This event provides access to the detailed data behind specific pivot intersections.

Declaration
public event EventHandler<DrillDownCompletedEventArgs> GetUnderlyingDataCompleted
Event Type
System.EventHandler<DrillDownCompletedEventArgs>

Implements
IUnderlyingDataProvider.GetUnderlyingDataCompleted

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.