PivotGridBuilder
Properties
WriteAction - Func
Methods
Configurator(System.String)
Use it to set the Id of the PivotConfigurator.
Parameters
configurator - System.String
The configurator
RETURNS
The PivotGridBuilder object to support method chaining.
DataSource(System.Action)
Sets the data source configuration of the grid.
Parameters
configurator - System.Action<PivotDataSourceBuilder>
The lambda which configures the data source
RETURNS
The PivotGridBuilder object to support method chaining.
DataSource(System.String)
Sets the ID of the DataSource widget used by the PivotGrid.
Parameters
dataSourceId - System.String
The name of the DataSource widget
RETURNS
The PivotGridBuilder object to support method chaining.
BindTo(System.Collections.Generic.IEnumerable)
Binds the pivotGrid to a list of objects
Parameters
dataSource - System.Collections.Generic.IEnumerable<T>
The data source.
RETURNS
The PivotGridBuilder object to support method chaining.
Messages(System.Action)
Sets the messages of the pivotGrid.
Parameters
addViewAction - System.Action<PivotGridMessagesBuilder>
The lambda which configures the pivotGrid messages
RETURNS
The PivotGridBuilder object to support method chaining.
KPIStatusTemplate(System.String)
Sets the KPI Status template of the pivot grid.
Parameters
template - System.String
The template
RETURNS
The PivotGridBuilder object to support method chaining.
Example
")
.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
RETURNS
The PivotGridBuilder object to support method chaining.
Example
@(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)
)
)
)
)
KPIStatusTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
Sets the KPI Status template of the pivot grid.
Parameters
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The template view
RETURNS
The PivotGridBuilder object to support method chaining.
Example
@(Html.Kendo().PivotGrid()
.Name("pivotgrid")
.KPIStatusTemplateView(Html.Partial("kpiStatusTemplate"))
.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)
)
)
)
)
KPIStatusTemplateHandler(System.String)
the JavaScript function that will return the status template of the pivot grid.
Parameters
templateHandler - System.String
The name of the JavaScript function
RETURNS
The PivotGridBuilder object to support method chaining.
KPITrendTemplate(System.String)
Sets the KPI Trend template of the pivot grid.
Parameters
template - System.String
The template
RETURNS
The PivotGridBuilder object to support method chaining.
Example
")
.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
RETURNS
The PivotGridBuilder object to support method chaining.
Example
@(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)
)
)
)
)
KPITrendTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
Sets the KPI Trend template of the pivot grid.
Parameters
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The template view
RETURNS
The PivotGridBuilder object to support method chaining.
Example
@(Html.Kendo().PivotGrid()
.Name("pivotgrid")
.KPITrendTemplateView(Html.Partial("kpiTrendTemplate"))
.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)
)
)
)
)
KPITrendTemplateHandler(System.String)
Sets the JavaScript function that will return the KPI Trend template of the pivot grid.
Parameters
templateHandler - System.String
the name of the JavaScript function
RETURNS
The PivotGridBuilder object to support method chaining.
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
RETURNS
Returns the current PivotGridBuilder instance.
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
RETURNS
Returns the current PivotGridBuilder instance.
Excel(System.Action)
Configures the Kendo UI PivotGrid Excel export settings.
Parameters
configurator - System.Action<PivotGridExcelSettingsBuilder>
The configurator for the excel setting.
RETURNS
Returns the current instance of PivotGridBuilder .
Pdf(System.Action)
Configures the Kendo UI PivotGrid PDF export settings.
Parameters
configurator - System.Action<PivotGridPdfSettingsBuilder>
The configurator for the pdf setting.
RETURNS
Returns the current instance of PivotGridBuilder .
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
RETURNS
Returns the current PivotGridBuilder instance.
Filterable()
If set to true the user will be able to filter by using the field menu.
RETURNS
Returns the current PivotGridBuilder instance.
Sortable(System.Action)
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<PivotGridSortableSettingsBuilder>
The configurator for the sortable setting.
RETURNS
Returns the current instance of PivotGridBuilder .
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.
RETURNS
Returns the current instance of PivotGridBuilder .
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.
RETURNS
Returns the current instance of PivotGridSortableSettingsBuilder .
ColumnWidth(System.Double)
The width of the table columns. Value is treated as pixels.
Parameters
value - System.Double
The value for ColumnWidth
RETURNS
Returns the current PivotGridBuilder instance.
Height(System.Double)
The height of the PivotGrid. Numeric values are treated as pixels.
Parameters
value - System.Double
The value for Height
RETURNS
Returns the current PivotGridBuilder instance.
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
RETURNS
Returns the current PivotGridBuilder instance.
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
RETURNS
Returns the current PivotGridBuilder instance.
ColumnHeaderTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
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
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template for ColumnHeaderTemplate
RETURNS
Returns the current PivotGridBuilder instance.
ColumnHeaderTemplateHandler(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
templateHandler - System.String
The handler that returs the template for ColumnHeaderTemplate
RETURNS
Returns the current PivotGridBuilder instance.
ColumnHeaderTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
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
template - TemplateBuilder<TModel>
A Template component that configures the columnheadertemplate.
RETURNS
Returns the current PivotGridBuilder instance.
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
RETURNS
Returns the current PivotGridBuilder instance.
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
RETURNS
Returns the current PivotGridBuilder instance.
DataCellTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
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
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template for DataCellTemplate
RETURNS
Returns the current PivotGridBuilder instance.
DataCellTemplateHandler(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
templateHandler - System.String
The handler that returs the template for DataCellTemplate
RETURNS
Returns the current PivotGridBuilder instance.
DataCellTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
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
template - TemplateBuilder<TModel>
A Template component that configures the datacelltemplate.
RETURNS
Returns the current PivotGridBuilder instance.
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
RETURNS
Returns the current PivotGridBuilder instance.
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
RETURNS
Returns the current PivotGridBuilder instance.
RowHeaderTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
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
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template for RowHeaderTemplate
RETURNS
Returns the current PivotGridBuilder instance.
RowHeaderTemplateHandler(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
templateHandler - System.String
The handler that returs the template for RowHeaderTemplate
RETURNS
Returns the current PivotGridBuilder instance.
RowHeaderTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
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
template - TemplateBuilder<TModel>
A Template component that configures the rowheadertemplate.
RETURNS
Returns the current PivotGridBuilder instance.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<PivotGridEventBuilder>
The client events action.
RETURNS
Returns the current PivotGridBuilder instance.
Example
@(Html.Kendo().PivotGrid()
.Name("PivotGrid")
.Events(events => events
.DataBinding("onDataBinding")
)
)
ToComponent()
Returns the internal view component.
RETURNS
The instance that represents the component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
RETURNS
Returns the current instance.
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
RETURNS
Returns the current instance.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
RETURNS
Returns the current instance.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
RETURNS
Returns a DeferredWidgetBuilder instance.
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
RETURNS
Returns the current instance.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
RETURNS
Returns the current instance.
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
Render()
Renders the component in place.
ToHtmlString()
Returns the HTML representation of the component.
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
Returns the client template for the component.
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
RETURNS
Returns the current instance.