New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring the PivotDataSource component.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TModel

Syntax:

C#
public class PivotDataSourceBuilder<TModel> where TModel : class

Inheritance: objectPivotDataSourceBuilder<TModel>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public PivotDataSourceBuilder(PivotDataSource dataSource, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:dataSourcePivotDataSourceviewContextViewContexturlGeneratorIUrlGenerator

Fields

C#
protected readonly PivotDataSource dataSource
C#
protected readonly IUrlGenerator urlGenerator

viewContext

ViewContext

C#
protected readonly ViewContext viewContext

Methods

Configures the DataSource of the PivotGrid component for Ajax binding to flat data.

C#
public PivotAjaxDataSourceBuilder<TModel> Ajax()
Returns:

PivotAjaxDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().PivotGrid()
.Name("pivotgrid")
...
.DataSource(dataSource =&gt; dataSource
.Ajax()
...
)
)

Configures the DataSource of the PivotGrid component for custom binding.

C#
public PivotCustomDataSourceBuilder Custom()
Returns:

PivotCustomDataSourceBuilder

Example:
C#
@(Html.Kendo().PivotGrid()
.Name("pivotgrid")
...
.DataSource(dataSource =&gt; dataSource
.Custom()
...
)
)

Configures the DataSource of the PivotGrid component for Xmla binding.

C#
public PivotXmlaDataSourceBuilder Xmla()
Returns:

PivotXmlaDataSourceBuilder

Example:
C#
@(Html.Kendo().PivotGrid()
.Name("pivotgrid")
...
.DataSource(dataSource =&gt; dataSource.
Xmla()
.Columns(columns =&gt; {
columns.Add("[Date].[Calendar]").Expand(true);
})
.Rows(rows =&gt; rows.Add("[Geography].[City]"))
.Transport(transport =&gt; transport
.Connection(connection =&gt; connection
.Catalog("Adventure Works DW 2008R2")
.Cube("Adventure Works"))
.Read(read =&gt; read
.Url("https:\\//demos.telerik.com/olap/msmdpump.dll")
.DataType("text")
.ContentType("text/xml")
.Type(HttpVerbs.Post)
)
)
)
)