Skip to content

Commit 89e79d4

Browse files
committed
Sync with Kendo UI Professional
1 parent 4809577 commit 89e79d4

19 files changed

+1140
-404
lines changed

docs-aspnet/_config-mvc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ html-helpers/navigation/drawer/razor-page.md,
131131
html-helpers/pdf/pdfviewer/razor-page.md,
132132
html-helpers/data-management/listview/binding/razor-page.md,
133133
html-helpers/media/mediaplayer/razor-page.md,
134+
html-helpers/charts/sparkline/razor-page.md,
135+
html-helpers/diagrams-and-maps/orgchart/binding/razor-page.md,
136+
html-helpers/data-management/pager/razor-page.md,
137+
html-helpers/pdf/pdfviewer/razor-page.md,
138+
html-helpers/data-management/pivotgrid/data-binding/razor-page.md,
139+
html-helpers/navigation/timeline/razor-pages.md,
140+
html-helpers/navigation/treeview/razor-page.md
134141
html-helpers/overview-taghelpers.md,
135142
html-helpers/data-management/pivotgridv2/data-binding/razor-page.md,
136143
html-helpers/data-management/taskboard/razor-page.md,

docs-aspnet/html-helpers/data-management/pivotgrid/data-binding/razor-page.md

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ This article describes how to configure the PivotGrid component in a Razor Pages
1616

1717
## Getting Started
1818

19-
The PivotGrid component provides a convenient integration with the Grid and DataSource. This example will demonstrate how to configure them in a Razor Pages scenario so that the PivotGrid appear at the top of the Grid.
19+
The following example demonstrates how to configure the PivotGrid in a Razor Pages scenario and bind it to a remote data collection.
2020

21-
1. Create the Grid, DataSource and PivotGrid definitions.
21+
1. Define the PivotGrid and specify the Read request URL in the `DataSource` configuration. The URL must refer to the method name in the `PageModel`.
2222

2323
```HtmlHelper_Index.cshtml
2424
@page
@@ -68,38 +68,40 @@ The PivotGrid component provides a convenient integration with the Grid and Data
6868
@using Kendo.Mvc.UI
6969
7070
<div class="k-pivotgrid-wrapper">
71-
<kendo-pivotdatasource type=@(PivotDataSourceType.Ajax) name="pivotSource">
72-
<columns>
73-
<pivot-datasource-column name="Country" expand="true"></pivot-datasource-column>
74-
<pivot-datasource-column name="CompanyName"></pivot-datasource-column>
75-
</columns>
76-
<rows>
77-
<row name="ContactTitle" expand="true"></row>
78-
</rows>
79-
<schema type="json">
80-
<cube>
81-
<dimensions>
82-
<dimension name="ContactName" caption="All Contact" />
83-
<dimension name="CompanyName" caption="All Companies" />
84-
<dimension name="Country" caption="All Countries" />
85-
<dimension name="ContactTitle" caption="All Titles" />
86-
</dimensions>
87-
<measures>
88-
<measure name="Contacts Count" field="CustomerID" aggregate="count" />
89-
</measures>
90-
</cube>
91-
</schema>
92-
<measures values='new string[] {"Contacts Count"}'></measures>
93-
<transport>
94-
<read url="/Index?handler=Read" data="forgeryToken" datatype="json" content-type="application/json" type="POST" />
95-
</transport>
96-
</kendo-pivotdatasource>
97-
98-
<kendo-pivotconfigurator name="configurator" datasource-id="pivotSource" filterable="true" height="570">
99-
</kendo-pivotconfigurator>
100-
101-
<kendo-pivotgrid name="pivotgrid" column-width="120" datasource-id="pivotSource" filterable="true" height="570">
102-
</kendo-pivotgrid>
71+
<kendo-pivotdatasource type="PivotDataSourceType.Custom" name="pivotSource">
72+
<columns>
73+
<pivot-datasource-column name="Country" expand="true"></pivot-datasource-column>
74+
<pivot-datasource-column name="CompanyName"></pivot-datasource-column>
75+
</columns>
76+
<rows>
77+
<row name="ContactTitle" expand="true"></row>
78+
</rows>
79+
<!-- Add configuration for "data", "total", and "errors" if the DataSource type is "aspnetmvc-ajax" -->
80+
<schema data="Data" Total="Total" Errors="Errors">
81+
<cube>
82+
<dimensions>
83+
<dimension name="ContactName" caption="All Contact" />
84+
<dimension name="CompanyName" caption="All Companies" />
85+
<dimension name="Country" caption="All Countries" />
86+
<dimension name="ContactTitle" caption="All Titles" />
87+
</dimensions>
88+
<measures>
89+
<measure name="Contacts Count" field="CustomerID" aggregate="count" />
90+
</measures>
91+
</cube>
92+
</schema>
93+
<measures values='new string[] {"Contacts Count"}'></measures>
94+
<transport>
95+
<!-- Set the "content-type", so the request is sent in the expected format. -->
96+
<read url="/Index?handler=Read" datatype="json" data="forgeryToken" content-type="application/x-www-form-urlencoded" type="POST" />
97+
</transport>
98+
</kendo-pivotdatasource>
99+
100+
<kendo-pivotconfigurator name="configurator" datasource-id="pivotSource" filterable="true" height="570">
101+
</kendo-pivotconfigurator>
102+
103+
<kendo-pivotgrid name="pivotgrid" column-width="120" datasource-id="pivotSource" filterable="true" height="570">
104+
</kendo-pivotgrid>
103105
</div>
104106
```
105107

0 commit comments

Comments
 (0)