Kendo.Mvc.UI.Fluent.PivotGridBuilder

Defines the fluent API for configuring the Kendo UI PivotGrid

Methods

Configurator(System.String)

Use it to set the Id of the PivotConfigurator.

Parameters

configurator System.String

The configurator

DataSource(System.Action<Kendo.Mvc.UI.Fluent.PivotDataSourceBuilder<T>>)

Sets the data source configuration of the grid.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.PivotDataSourceBuilder>

The lambda which configures the data source

BindTo(System.Collections.Generic.IEnumerable<T>)

Binds the pivotGrid to a list of objects

Parameters

dataSource System.Collections.Generic.IEnumerable<T>

The data source.

Messages(System.Action<Kendo.Mvc.UI.Fluent.PivotGridMessagesBuilder>)

Sets the messages of the pivotGrid.

Parameters

addViewAction System.Action<Kendo.Mvc.UI.Fluent.PivotGridMessagesBuilder>

The lambda which configures the pivotGrid messages

KPIStatusTemplate(System.String)

Sets the KPI Status template of the pivot grid.

Parameters

template System.String

The template

Example (Razor)

@(Html.Kendo().PivotGrid()
    .Name("pivotgrid")
    .KPIStatusTemplate("#: dataItem.value #")
    .DataSource(dataSource =>
        dataSource.Xmla()
        .Columns(columns => columns.Add("[Date].[Calendar]").Expand(true))
        .Rows(rows => rows.Add("[Geography].[City]"))
        .Measures(measures => measures.Values(new string[]{"[Measures].[Internet Sales Amount]"}))
        .Transport(transport => transport
            .Connection(connection => connection
                .Catalog("Adventure Works DW 2008R2")
                .Cube("Adventure Works"))
                .Read(read => read
                    .Url("http://demos.telerik.com/olap/msmdpump.dll")
                    .DataType("text")
                    .ContentType("text/xml")
                    .Type(HttpVerbs.Post)
                )
            )
        )
    )

KPIStatusTemplateId(System.String)

Sets the KPI Status template of the pivot grid.

Parameters

templateId System.String

The template id

Example (Razor)

@(Html.Kendo().PivotGrid()
    .Name("pivotgrid")
    .KPIStatusTemplateId("kpiStatusTemplateId")
    .DataSource(dataSource =>
        dataSource.Xmla()
        .Columns(columns => columns.Add("[Date].[Calendar]").Expand(true))
        .Rows(rows => rows.Add("[Geography].[City]"))
        .Measures(measures => measures.Values(new string[]{"[Measures].[Internet Sales Amount]"}))
        .Transport(transport => transport
            .Connection(connection => connection
                .Catalog("Adventure Works DW 2008R2")
                .Cube("Adventure Works"))
                .Read(read => read
                    .Url("http://demos.telerik.com/olap/msmdpump.dll")
                    .DataType("text")
                    .ContentType("text/xml")
                    .Type(HttpVerbs.Post)
                )
            )
        )
    )

KPITrendTemplate(System.String)

Sets the KPI Trend template of the pivot grid.

Parameters

template System.String

The template

Example (Razor)

@(Html.Kendo().PivotGrid()
    .Name("pivotgrid")
    .KPITrendTemplate("#: dataItem.value #")
    .DataSource(dataSource =>
        dataSource.Xmla()
        .Columns(columns => columns.Add("[Date].[Calendar]").Expand(true))
        .Rows(rows => rows.Add("[Geography].[City]"))
        .Measures(measures => measures.Values(new string[]{"[Measures].[Internet Sales Amount]"}))
        .Transport(transport => transport
            .Connection(connection => connection
                .Catalog("Adventure Works DW 2008R2")
                .Cube("Adventure Works"))
                .Read(read => read
                    .Url("http://demos.telerik.com/olap/msmdpump.dll")
                    .DataType("text")
                    .ContentType("text/xml")
                    .Type(HttpVerbs.Post)
                )
            )
        )
    )

KPITrendTemplateId(System.String)

Sets the KPI Trend template of the pivot grid.

Parameters

templateId System.String

The template id

Example (Razor)

@(Html.Kendo().PivotGrid()
    .Name("pivotgrid")
    .KPITrendTemplateId("kpiTrendTemplateId")
    .DataSource(dataSource =>
        dataSource.Xmla()
        .Columns(columns => columns.Add("[Date].[Calendar]").Expand(true))
        .Rows(rows => rows.Add("[Geography].[City]"))
        .Measures(measures => measures.Values(new string[]{"[Measures].[Internet Sales Amount]"}))
        .Transport(transport => transport
            .Connection(connection => connection
                .Catalog("Adventure Works DW 2008R2")
                .Cube("Adventure Works"))
                .Read(read => read
                    .Url("http://demos.telerik.com/olap/msmdpump.dll")
                    .DataType("text")
                    .ContentType("text/xml")
                    .Type(HttpVerbs.Post)
                )
            )
        )
    )

AutoBind(System.Boolean)

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

Parameters

value System.Boolean

The value for AutoBind

Reorderable(System.Boolean)

If set to false the user will not be able to add/close/reorder current fields for columns/rows/measures.

Parameters

value System.Boolean

The value for Reorderable

Excel(System.Action<Kendo.Mvc.UI.Fluent.PivotGridExcelSettingsBuilder<T>>)

Configures the Kendo UI PivotGrid Excel export settings.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.PivotGridExcelSettingsBuilder>

The configurator for the excel setting.

Pdf(System.Action<Kendo.Mvc.UI.Fluent.PivotGridPdfSettingsBuilder<T>>)

Configures the Kendo UI PivotGrid PDF export settings.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.PivotGridPdfSettingsBuilder>

The configurator for the pdf setting.

Filterable(System.Boolean)

If set to true the user will be able to filter by using the field menu.

Parameters

value System.Boolean

The value for Filterable

Filterable

If set to true the user will be able to filter by using the field menu.

Sortable(System.Action<Kendo.Mvc.UI.Fluent.PivotGridSortableSettingsBuilder<T>>)

If set to true the user could sort the pivotgrid by clicking the dimension fields. By default sorting is disabled.Can be set to a JavaScript object which represents the sorting configuration.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.PivotGridSortableSettingsBuilder>

The configurator for the sortable setting.

Sortable

If set to true the user could sort the pivotgrid by clicking the dimension fields. By default sorting is disabled.Can be set to a JavaScript object which represents the sorting configuration.

Sortable(System.Boolean)

If set to true the user could sort the pivotgrid by clicking the dimension fields. By default sorting is disabled.Can be set to a JavaScript object which represents the sorting configuration.

Parameters

enabled System.Boolean

Enables or disables the sortable option.

ColumnWidth(System.Double)

The width of the table columns. Value is treated as pixels.

Parameters

value System.Double

The value for ColumnWidth

Height(System.Double)

The height of the PivotGrid. Numeric values are treated as pixels.

Parameters

value System.Double

The value for Height

ColumnHeaderTemplate(System.String)

The template which renders the content of the column header cell. By default it renders the caption of the tuple member.The fields which can be used in the template are: member - the member of the corresponding column header cell or tuple - the tuple of the corresponding column header cell. For information about the tuple structure check this link.

Parameters

value System.String

The value for ColumnHeaderTemplate

ColumnHeaderTemplateId(System.String)

The template which renders the content of the column header cell. By default it renders the caption of the tuple member.The fields which can be used in the template are: member - the member of the corresponding column header cell or tuple - the tuple of the corresponding column header cell. For information about the tuple structure check this link.

Parameters

templateId System.String

The ID of the template element for ColumnHeaderTemplate

DataCellTemplate(System.String)

The template which renders the content of the data cell. By default renders the formatted value (fmtValue) of the data item.The fields which can be used in the template are: columnTuple - the tuple of the corresponding column header cell; rowTuple - the tuple of the corresponding row header cell; measure - the value of the data cell measure or dataItem - the data item itself. For information about the tuple structure check this link. About the data item structure review this help topic.

Parameters

value System.String

The value for DataCellTemplate

DataCellTemplateId(System.String)

The template which renders the content of the data cell. By default renders the formatted value (fmtValue) of the data item.The fields which can be used in the template are: columnTuple - the tuple of the corresponding column header cell; rowTuple - the tuple of the corresponding row header cell; measure - the value of the data cell measure or dataItem - the data item itself. For information about the tuple structure check this link. About the data item structure review this help topic.

Parameters

templateId System.String

The ID of the template element for DataCellTemplate

RowHeaderTemplate(System.String)

The template which renders the content of the row header cell. By default it renders the caption of the tuple member.The fields which can be used in the template are: member - the member of the corresponding row header cell or tuple - the tuple of the corresponding row header cell. For information about the tuple structure check this link.

Parameters

value System.String

The value for RowHeaderTemplate

RowHeaderTemplateId(System.String)

The template which renders the content of the row header cell. By default it renders the caption of the tuple member.The fields which can be used in the template are: member - the member of the corresponding row header cell or tuple - the tuple of the corresponding row header cell. For information about the tuple structure check this link.

Parameters

templateId System.String

The ID of the template element for RowHeaderTemplate

Events(System.Action<Kendo.Mvc.UI.Fluent.PivotGridEventBuilder>)

Configures the client-side events.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.PivotGridEventBuilder>

The client events action.

Example (ASPX)

@(Html.Kendo().PivotGrid()
    .Name("PivotGrid")
    .Events(events => events
        .DataBinding("onDataBinding")
    )
)