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

PivotCustomDataSourceV2Builder

Methods

Events(System.Action)

Configures the client-side events

Parameters

configurator - System.Action<DataSourceEventBuilder>

The lambda that configures the DataSource events settings.

Example


            @(Html.Kendo().PivotGridV2()
                .Name("pivotgrid")
                .DataSource(dataSource => dataSource.Custom()
                    .Events(events => events.Change("onDataSourceChange"))
                )
            )

Schema(System.Action)

Configures the schema of the Custom DataSource

Parameters

configurator - System.Action<PivotAjaxDataSourceSchemaBuilder>

The lambda that configures the DataSource schema settings.

Example


            @(Html.Kendo().PivotGridV2()
                .Name("pivotgrid")
                .DataSource(dataSource => dataSource.Custom()
                    .Schema(schema => schema.Model(model => model.Id("ProductID")))
                )
            )

Transport(System.Action)

Configures the transport of the Custom DataSource

Parameters

configurator - System.Action<PivotCustomDataSourceTransportBuilder>

The lambda that configures the DataSource transport settings.

Example


            @(Html.Kendo().PivotGridV2()
                .Name("pivotgrid")
                .DataSource(dataSource => dataSource.Custom()
                    .Transport(transport => transport
                        .Connection(connection => connection
                            .Catalog("Adventure Works DW 2008R2")
                            .Cube("Adventure Works"))
                        .Read("https://demos.telerik.com/olap/msmdpump.dll")
                    )
                )
            )

Columns(System.Action)

Sets the columns of the Custom DataSource.

Parameters

addColumnAction - System.Action<PivotDataSourceColumnFactory>

The lambda that configures the DataSource column settings.

Example


            @(Html.Kendo().PivotGridV2()
                .Name("pivotgrid")
                .DataSource(dataSource => dataSource.Custom()
                    .Columns(columns => {
                        columns.Add("[Product].[Category]");
                    })
                )
            )

Rows(System.Action)

Sets the rows of the Custom DataSource.

Parameters

addRowAction - System.Action<PivotDataSourceRowFactory>

The lambda that configures the DataSource row settings.

Example


            @(Html.Kendo().PivotGridV2()
                .Name("pivotgrid")
                .DataSource(dataSource => dataSource.Custom()
                    .Rows(rows => rows.Add("[Geography].[City]"))
                )
            )

Measures(System.Action)

Sets the measures of the Custom DataSource.

Parameters

configurator - System.Action<PivotDataSourceMeasureBuilder>

The lambda that configures the DataSource measures settings.

Example


            @(Html.Kendo().PivotGridV2()
                .Name("pivotgrid")
                .DataSource(dataSource => dataSource.Custom()
                    .Measures(measures => measures.Values(new string[]{"[Measures].[Reseller Freight Cost]"}))
                )
            )

Filter(System.Action)

Configures the initial filtering.

Parameters

configurator - System.Action<DataSourceFilterDescriptorFactory>

The lambda that configures the DataSource filter settings.

Example


            @(Html.Kendo().PivotGridV2<ProductViewModel>()
                .Name("pivotgrid")
                .BindTo(Model)
                .DataSource(dataSource => dataSource.Custom()
                    .Filter(f => f.Add(m => m.ProductName).Equals("Bread")))
                )
            )

In this article
Not finding the help you need?