Class
QueryableDataProvider

Provides pivot data operations for IQueryable data sources using LINQ expressions. This data provider enables pivot operations on in-memory collections, Entity Framework contexts, and other LINQ-compatible data sources with support for dynamic grouping, filtering, and aggregation.

Definition

Namespace:Telerik.Pivot.Queryable

Assembly:Telerik.WinControls.PivotGrid.dll

Syntax:

cs-api-definition
public class QueryableDataProvider : DataProviderBase, IDataProvider, INotifyPropertyChanged, ISupportInitialize

Inheritance: objectDataProviderBaseQueryableDataProvider

Implements: IDataProviderINotifyPropertyChangedISupportInitialize

Inherited Members 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.FieldInfosDataProviderBase.DeferUpdatesDataProviderBase.StatusDataProviderBase.AggregatesPositionDataProviderBase.AggregatesLevelDataProviderBase.FieldDescriptionsProviderDataProviderBase.HasPendingChangesDataProviderBase.SettingsDataProviderBase.StatusChangedDataProviderBase.PropertyChangedDataProviderBase.PrepareDescriptionForField

Constructors

QueryableDataProvider()

Initializes a new instance of the QueryableDataProvider class with default pivot engine. Sets up the provider for processing IQueryable data sources with LINQ-based pivot operations.

Declaration

cs-api-definition
public QueryableDataProvider()

Properties

AggregateDescriptions

Gets a collection of QueryableAggregateDescriptionBase 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 LINQ aggregate functions.

Declaration

cs-api-definition
public Collection<QueryableAggregateDescriptionBase> AggregateDescriptions { get; }

Property Value

Collection<QueryableAggregateDescriptionBase>

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.

Declaration

cs-api-definition
public Collection<CalculatedField> CalculatedFields { get; }

Property Value

Collection<CalculatedField>

ColumnGroupDescriptions

Gets a collection of QueryableGroupDescription 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 LINQ expressions.

Declaration

cs-api-definition
public Collection<QueryableGroupDescription> ColumnGroupDescriptions { get; }

Property Value

Collection<QueryableGroupDescription>

Culture

Gets or sets the CultureInfo used for grouping, formatting, and date/time operations. This culture affects how data is grouped and displayed in different locales.

Declaration

cs-api-definition
public CultureInfo Culture { get; set; }

Property Value

CultureInfo

FilterDescriptions

Gets a collection of QueryableFilterDescription objects that specify how pivot items should be filtered. Filters are applied to the IQueryable source before grouping and aggregation operations are performed.

Declaration

cs-api-definition
public Collection<QueryableFilterDescription> FilterDescriptions { get; }

Property Value

Collection<QueryableFilterDescription>

Results

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

Declaration

cs-api-definition
protected override IPivotResults Results { get; }

Property Value

IPivotResults

Overrides DataProviderBase.Results

RowGroupDescriptions

Gets a collection of QueryableGroupDescription 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 LINQ expressions.

Declaration

cs-api-definition
public Collection<QueryableGroupDescription> RowGroupDescriptions { get; }

Property Value

Collection<QueryableGroupDescription>

Source

Gets or sets the IQueryable data source for pivot operations. This can be any IQueryable implementation including LINQ to Objects collections, Entity Framework contexts, or other LINQ providers that support the required query operations.

Declaration

cs-api-definition
public IQueryable Source { get; set; }

Property Value

IQueryable

State

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

Declaration

cs-api-definition
public override object State { get; }

Property Value

object

The Source object representing the current provider state.

Overrides DataProviderBase.State

Methods

BlockUntilRefreshCompletes()

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

Declaration

cs-api-definition
public override void BlockUntilRefreshCompletes()

Overrides DataProviderBase.BlockUntilRefreshCompletes()

CreateFieldDescriptionsProvider()

Creates a field description provider for retrieving metadata and field information from the IQueryable data source. This provider is used to discover available properties and their types in the source data.

Declaration

cs-api-definition
protected override IFieldDescriptionProvider CreateFieldDescriptionsProvider()

Returns

IFieldDescriptionProvider

A new QueryableFieldDescriptionsProvider instance for analyzing the queryable source.

Overrides DataProviderBase.CreateFieldDescriptionsProvider()

GetAggregateDescriptionForFieldDescriptionCore(IPivotFieldInfo)

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

Declaration

cs-api-definition
protected override IAggregateDescription GetAggregateDescriptionForFieldDescriptionCore(IPivotFieldInfo description)

Parameters

description

IPivotFieldInfo

The pivot field information to create an aggregate description for.

Returns

IAggregateDescription

A QueryableAggregateDescriptionBase configured for the specified field.

Exceptions

ArgumentNullException

Thrown when description is null.

Overrides DataProviderBase.GetAggregateDescriptionForFieldDescriptionCore(IPivotFieldInfo)

GetFilterDescriptionForFieldDescriptionCore(IPivotFieldInfo)

Creates a filter description for the specified field that can be used in queryable pivot filtering operations. The description is configured with the field name for property-based filtering using LINQ expressions.

Declaration

cs-api-definition
protected override FilterDescription GetFilterDescriptionForFieldDescriptionCore(IPivotFieldInfo description)

Parameters

description

IPivotFieldInfo

The pivot field information to create a filter description for.

Returns

FilterDescription

A QueryablePropertyFilterDescription configured for the specified field.

Exceptions

ArgumentNullException

Thrown when description is null.

Overrides DataProviderBase.GetFilterDescriptionForFieldDescriptionCore(IPivotFieldInfo)

GetGroupDescriptionForFieldDescriptionCore(IPivotFieldInfo)

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

Declaration

cs-api-definition
protected override IGroupDescription GetGroupDescriptionForFieldDescriptionCore(IPivotFieldInfo description)

Parameters

description

IPivotFieldInfo

The pivot field information to create a group description for.

Returns

IGroupDescription

A QueryableGroupDescription configured for the specified field type.

Exceptions

ArgumentNullException

Thrown when description is null.

Overrides DataProviderBase.GetGroupDescriptionForFieldDescriptionCore(IPivotFieldInfo)

RefreshOverride()

Performs the core refresh operation by generating LINQ queries, executing them against the IQueryable source, and processing the results. This method handles field initialization, query generation, and result processing.

Declaration

cs-api-definition
protected override void RefreshOverride()

Overrides DataProviderBase.RefreshOverride()