Skip to content

Commit 8d725ac

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 7758aab commit 8d725ac

File tree

23 files changed

+509
-255
lines changed

23 files changed

+509
-255
lines changed

docs-aspnet/_config-mvc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ knowledge-base/upload-resize-image-before-upload.md,
6262
knowledge-base/validator-basic-form-validation.md,
6363
knowledge-base/vs-online-continuous-integration-login-problem.md,
6464
knowledge-base/grid-toggle-editable-mode.md,
65+
html-helpers/data-management/grid/binding/local.md,
6566
html-helpers/data-management/filemanager/binding/razor-page.md,
6667
html-helpers/datasource/razor-page.md,
6768
html-helpers/conversational-ui/chat/razor-page.md,

docs-aspnet/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,10 +623,10 @@ navigation:
623623
baseurl: /aspnet-core
624624

625625
## The Kendo UI version used
626-
cdnVersion: "2022.1.412"
626+
cdnVersion: "2022.2.510"
627627

628628
## The MVC Core version used
629-
mvcCoreVersion: "2022.1.412"
629+
mvcCoreVersion: "2022.2.510"
630630

631631
ff-sheet-id: 1mottKpkbJFxkUq6rS3CsPrT8JQOE2JlUtsJBR622cxs
632632

docs-aspnet/cloud-integration/amazon-web-services/s3-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private string Policy(S3Config config)
144144
new { acl = config.Acl },
145145
new [] { "starts-with", "$success_action_redirect", "" },
146146
new [] { "starts-with", "$Content-Type", config.ContentTypePrefix },
147-
new Dictionary<string, string> {{ "x-amz-meta-uuid", config.Uuid.ToString() }}
147+
new Dictionary<string, string> {% raw %} {{ "x-amz-meta-uuid", config.Uuid.ToString() }} {% endraw %}
148148
}
149149
});
150150

docs-aspnet/html-helpers/data-management/grid/binding/local.md

Lines changed: 1 addition & 210 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ slug: htmlhelpers_grid_aspnetcore_localbinding
77
position: 3
88
---
99

10-
{% if site.core %}
1110
# Local Binding
1211

1312
When configured for local binding, the Grid for {{ site.framework }} will serialize the data as part of its data source and will perform all data operations, such as paging, sorting, filtering, grouping, and aggregating, on the client.
@@ -85,212 +84,4 @@ To configure the Grid for {{ site.framework }} to do local binding:
8584
8685
* [Custom Ajax Binding by the Grid HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/grid/customajaxbinding)
8786
* [Knowledge Base Section](/knowledge-base)
88-
* [Server-Side API](/api/grid)
89-
90-
{% else %}
91-
92-
# Server Binding
93-
94-
By default, the Telerik UI Grid for ASP.NET MVC performs server-side requests (`HTTP` and `GET`) when doing paging, sorting, and filtering.
95-
96-
## Supported Client-Side Events
97-
98-
The Grid supports the following client-side events when it is in server binding mode:
99-
100-
- `Change`
101-
- `ColumnHide`
102-
- `ColumnMenuInit`
103-
- `ColumnReorder`
104-
- `ColumnResize`
105-
- `ColumnShow`
106-
- `DetailCollapse`
107-
- `DetailExpand`
108-
- `ExcelExport`
109-
- `FilterMenuInit`
110-
- `PdfExport`
111-
- `GroupExpand`&mdash;The group object that is associated with group row will be empty in server binding scenario.
112-
- `GroupCollapse`&mdash;The group object that is associated with group row will be empty in server binding scenario.
113-
114-
> * The other client-side events, which are related to data-binding and CRUD data operations, will not be raised when the Grid is configured for server binding.
115-
> * Locked columns are not supported. To support locked columns, use [Ajax binding]({% slug htmlhelpers_grid_aspnetcore_ajaxbinding %}) instead.
116-
> * Showing or hiding of columns and reordering with the `GroupHeaderColumnTemplate` in server-binding scenarios is not supported. The reason is that in server-binding scenarios the Kendo UI for jQuery DataSource instance does not have groups and aggregates information. Therefore, the templates for the group rows cannot be compiled on the client side. If your project requires such a scenario, use [Ajax binding]({% slug htmlhelpers_grid_aspnetcore_ajaxbinding %}).
117-
118-
## Getting Started
119-
120-
To bind the Grid to data, set its data source and render the view by using any of the following approaches:
121-
122-
* [Bind to the view model](#binding-to-the-view-model)
123-
* [Bind to items from `ViewData` or `ViewBag`](#using-the-viewdata-or-viewbag-items-binding)
124-
* [Use the `BindTo` method](#applying-the-bindto-method)
125-
* [Pass additional data to an action method](#passing-additional-data-to-action-methods)
126-
127-
## Binding to the View Model
128-
129-
To download the Visual Studio Project, refer to [this GitHub repository](https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/server-binding).
130-
131-
```Controller
132-
public ActionResult Index()
133-
{
134-
var northwind = new NorthwindEntities();
135-
var products = northwind.Products;
136-
return View(products);
137-
}
138-
```
139-
```Razor
140-
@model IEnumerable<KendoGridServerBinding.Models.Product>
141-
142-
@(Html.Kendo().Grid(Model) //Bind the Grid to the Model property of the view.
143-
.Name("Grid")
144-
.Columns(columns =>
145-
{
146-
columns.Bound(p => p.ProductID); // Create a column bound to the "ProductID" property
147-
columns.Bound(p => p.ProductName); // Create a column bound to the "ProductName" property
148-
columns.Bound(p => p.UnitPrice); // Create a column bound to the "UnitPrice" property
149-
columns.Bound(p => p.UnitsInStock);// Create a column bound to the "UnitsInStock" property
150-
})
151-
.Pageable() //Enable paging.
152-
)
153-
```
154-
155-
## Using the ViewData or ViewBag Items Binding
156-
157-
The following example demonstrate how to apply data binding with `ViewData` or `ViewBag`.
158-
159-
```Controller
160-
public ActionResult Index()
161-
{
162-
var products = new NorthwindDataContext().Products;
163-
164-
ViewData["products"] = products;
165-
166-
return View();
167-
}
168-
```
169-
```Razor
170-
@(Html.Kendo().Grid((IEnumerable<MvcApplication1.Models.Product>)ViewData["products"])
171-
.Name("Grid")
172-
.Columns(columns =>
173-
{
174-
columns.Bound(p => p.ProductID);
175-
columns.Bound(p => p.ProductName);
176-
columns.Bound(p => p.UnitPrice);
177-
columns.Bound(p => p.UnitsInStock);
178-
})
179-
)
180-
```
181-
182-
## Applying the BindTo Method
183-
184-
The following example demonstrates how to bind the Grid to data by using the `BindTo` method.
185-
186-
```Controller
187-
public ActionResult Index()
188-
{
189-
var products = new NorthwindDataContext().Products;
190-
191-
ViewBag.Products = products;
192-
193-
return View();
194-
}
195-
```
196-
```Razor
197-
@(Html.Kendo().Grid<MvcApplication1.Models.Product>() // Specify the type of the grid
198-
.Name("Grid")
199-
.BindTo((IEnumerable<MvcApplication1.Models.Product>)ViewBag.Products)
200-
.Columns(columns =>
201-
{
202-
columns.Bound(p => p.ProductID);
203-
columns.Bound(p => p.ProductName);
204-
columns.Bound(p => p.UnitPrice);
205-
columns.Bound(p => p.UnitsInStock);
206-
})
207-
)
208-
```
209-
210-
The Grid makes `HTTP GET` requests to the action method which initially renders the view. The Grid page, sort, filter, and group information is passed as query string parameters.
211-
212-
For more information on how a typical URL looks like, refer to [this location](http://localhost:4939/?Grid-sort=ProductName-asc&amp;Grid-page=2\). The `Name` of the Grid will be used as a prefix of the query string parameters. In this way, more than one server-bound Grid can coexist in the same view. The prefix can be disabled through the `PrefixUrlParameters` method.
213-
214-
<%: Html.Kendo().Grid(Model)
215-
.Name("Grid")
216-
.PrefixUrlParameters(false)
217-
%>
218-
219-
## Passing Additional Data to Action Methods
220-
221-
The action method which renders the view that contains the Grid may need additional data.
222-
223-
```Controller
224-
public ActionResult Index(string firstName, string lastName)
225-
{
226-
var products = new NorthwindDataContext().Products;
227-
228-
return View(products);
229-
}
230-
```
231-
```Razor
232-
@(Html.Kendo().Grid(Model)
233-
.Name("Grid")
234-
.DataSource(dataSource => dataSource
235-
.Server() // Specify server type
236-
.Read(read => read.Action("Index", "Home", new { firstName = "John", lastName = "Doe } ))
237-
)
238-
)
239-
```
240-
241-
## Setting Up the Sample Project
242-
243-
1. Create a new ASP.NET MVC 5 application. If you have installed the [Telerik UI for ASP.NET MVC Visual Studio Extensions]({% slug overview_visualstudio_aspnetmvc %}), create a Telerik UI for ASP.NET MVC application. Name the application `KendoGridServerBinding`. If you decided not to use the Telerik UI for ASP.NET MVC Visual Studio Extensions, follow the steps from the [First Steps article]({% slug gettingstarted_aspnetmvc %}) to add Telerik UI for ASP.NET MVC to the application.
244-
1. Add a new `Entity Framework Data Model`. Right-click the `~/Models` folder in the solution explorer and pick **Add new item**. Choose **Data** > **ADO.NET Entity Data Model** in the **Add New Item** dialog. Name the model `Northwind.edmx` and click **Next**. This starts the **Entity Data Model Wizard**.
245-
246-
![A new entity data model](../images/grid-entity-data-model.png)
247-
248-
1. Pick the **Generate from database** option and click **Next**. Configure a connection to the Northwind database. Click **Next**.
249-
250-
![Choosing the connection](../images/grid-entity-data-model.png)
251-
252-
1. Choose the **Products** table from the `Which database objects do you want to include in your model?`. Leave all other options as they are set by default. Click **Finish**.
253-
254-
![Choosing the Products table](../images/grid-database-objects.png)
255-
256-
1. Open **HomeController.cs** and modify the `Index` action method.
257-
258-
public ActionResult Index()
259-
{
260-
ViewBag.Message = "Welcome to ASP.NET MVC!";
261-
var northwind = new NorthwindEntities();
262-
// Get the Products entities and add them to the ViewBag.
263-
ViewBag.Products = northwind.Products;
264-
return View();
265-
}
266-
267-
1. Add a Kendo UI Grid to the `Index` view.
268-
269-
```Razor
270-
@(Html.Kendo().Grid((IEnumerable<KendoGridServerBinding.Models.Product>)ViewBag.Products) //Bind the grid to ViewBag.Products
271-
.Name("grid")
272-
.Columns(columns =>
273-
{
274-
// Create a column bound to the ProductID property.
275-
columns.Bound(product => product.ProductID);
276-
// Create a column bound to the ProductName property.
277-
columns.Bound(product => product.ProductName);
278-
// Create a column bound to the UnitsInStock property.
279-
columns.Bound(product => product.UnitsInStock);
280-
})
281-
.Pageable() //Enable the paging.
282-
.Sortable() //Enable the sorting.
283-
)
284-
```
285-
286-
1. Build and run the application.
287-
288-
![The final result](../images/grid-bound-grid.png)
289-
290-
## See Also
291-
292-
* [Binding the Grid HtmlHelper for ASP.NET MVC to Data (Demos)](https://demos.telerik.com/aspnet-mvc/grid/local-data-binding)
293-
* [Ajax Binding by the Grid HtmlHelper for ASP.NET MVC]({% slug htmlhelpers_grid_aspnetcore_ajaxbinding %})
294-
* [Server-Side API](/api/grid)
295-
296-
{% endif %}
87+
* [Server-Side API](/api/grid)

docs-aspnet/html-helpers/data-management/grid/binding/overview.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ position: 1
1111

1212
Depending on the configuration of its [DataSource]({% slug htmlhelpers_datasource_aspnetcore %}), the {{ site.product_short }} Grid provides different types of data binding.
1313

14+
*{% if site.core %}
1415
* [Local data binding]({% slug htmlhelpers_grid_aspnetcore_localbinding %})
16+
{% else %}
17+
* [Server binding binding]({% slug serverbinding_grid_aspnetmvc %})
18+
{% endif %}
1519
* [Remote data binding]({% slug htmlhelpers_grid_aspnetcore_ajaxbinding %})
1620
* [SignalR data binding]({% slug htmlhelpers_grid_aspnetcore_signalrbinding %})
1721
* [Custom Binding]({% slug custombinding_grid_aspnetmvc %}){% if site.mvc %}

docs-aspnet/html-helpers/data-management/grid/scaffolding.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ To scaffold the Grid HtmlHelper for ASP.NET MVC:
9090

9191
From this screen, you can select the Grid events to which you want to attach handlers.
9292

93-
> Not all events are supported in the server-binding mode. To see the complete list, refer to [this article]({% slug htmlhelpers_grid_aspnetcore_localbinding %}#supported-client-side-events).
93+
{% if site.core %}
94+
> Not all events are supported in the local-binding mode. To see the complete list, refer to [this article]({% slug htmlhelpers_grid_aspnetcore_localbinding %}#supported-client-side-events).
95+
{% else %}
96+
> Not all events are supported in the server-binding mode. To see the complete list, refer to [this article]({% slug serverbinding_grid_aspnetmvc %}#supported-client-side-events).
97+
{% endif %}
9498

9599
1. When finished with the Grid configuration, click **Add** at the bottom. The Grid Controller and the corresponding View are now generated.
96100

docs-aspnet/html-helpers/data-management/grid/troubleshoot/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The causes of this issue are various.
4646
{% else %}
4747
When configured for server binding, the Kendo UI Grid for ASP.NET MVC does not fire all client-side events.
4848

49-
**Solution** For more information on how to resolve this issue, refer to the [article on server binding of the Grid]({% slug htmlhelpers_grid_aspnetcore_localbinding %}#supported-client-side-events).
49+
**Solution** For more information on how to resolve this issue, refer to the [article on server binding of the Grid]({% slug serverbinding_grid_aspnetmvc %}#supported-client-side-events).
5050

5151
For an Ajax() bound Grid, make sure that the `.ServerOperation(false)` property is disabled.
5252
{% endif %}

docs-aspnet/html-helpers/editors/listbox/accessibility/keyboard-navigation.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ The ListBox supports its keyboard navigation functionality through the `Navigata
1414

1515
The following example demonstrates how to enable the key navigation in the ListBox.
1616

17-
```
17+
```HtmlHelper
18+
1819
@(Html.Kendo().ListBox()
1920
.Name("listbox")
2021
.ConnectWith("listbox2")
@@ -35,7 +36,36 @@ The following example demonstrates how to enable the key navigation in the ListB
3536
.Selectable(ListBoxSelectable.Single)
3637
.Navigatable(true) // Enable the keyboard navigation
3738
)
39+
40+
```
41+
{% if site.core %}
42+
```TagHelper
43+
@{
44+
var products = new List<ProductViewModel>();
45+
}
46+
<kendo-listbox name="listbox"
47+
connect-with="listbox2"
48+
datavaluefield="ProductID"
49+
datatextfield="ProductName"
50+
selectable="ListBoxSelectable.Multiple"
51+
navigatable="true">
52+
<datasource>
53+
<transport>
54+
<read url="@Url.Action("GetProducts", "ListBox")"/>
55+
</transport>
56+
</datasource>
57+
</kendo-listbox>
58+
59+
<kendo-listbox name="listbox2"
60+
bind-to="products"
61+
datavaluefield="ProductID"
62+
datatextfield="ProductName"
63+
selectable="ListBoxSelectable.Single"
64+
navigatable="true">
65+
</kendo-listbox>
66+
3867
```
68+
{% endif %}
3969

4070
## See Also
4171

docs-aspnet/html-helpers/editors/listbox/binding/local.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,26 @@ When you use complex data objects, use the `DataTextField` and `DataValueField`
3838
.Selectable(ListBoxSelectable.Multiple)
3939
)
4040
```
41+
{% if site.core %}
42+
```TagHelper
43+
44+
@{
45+
var tools = new string[] { "moveUp", "moveDown", "transferTo", "transferFrom", "transferAllTo", "transferAllFrom", "remove" };
46+
var selectedItems = new List<SelectListItem>();
47+
}
48+
49+
<kendo-listbox name="optional"
50+
connect-with="selected"
51+
bind-to="@ViewBag.Attendees">
52+
<toolbar position="ListBoxToolbarPosition.Right"
53+
tools="tools"/>
54+
</kendo-listbox>
55+
<kendo-listbox name="selected"
56+
bind-to="selectedItems"
57+
selectable="ListBoxSelectable.Multiple">
58+
</kendo-listbox>
59+
```
60+
{% endif %}
4161
```IndexController.cs
4262
using System;
4363
using System.Collections.Generic;
@@ -51,15 +71,14 @@ When you use complex data objects, use the `DataTextField` and `DataValueField`
5171
{
5272
public IActionResult Index()
5373
{
54-
ViewBag.Attendees = new List<string>
74+
ViewBag.Attendees = new List<SelectListItem>
5575
{
56-
"Steven White",
57-
"Nancy King",
58-
"Nancy Davolio",
59-
"Robert Davolio",
60-
"Michael Leverling",
61-
"Andrew Callahan",
62-
"Michael Suyama"
76+
new SelectListItem(){ Value = "1", Text = "Steven White" },
77+
new SelectListItem(){ Value = "2", Text = "Nancy King" },
78+
new SelectListItem(){ Value = "3", Text = "Nancy Davolio" },
79+
new SelectListItem(){ Value = "4", Text = "Michael Leverling" },
80+
new SelectListItem(){ Value = "5", Text = "Andrew Callahan" },
81+
new SelectListItem(){ Value = "6", Text = "Michael Suyama" }
6382
};
6483

6584
return View();

0 commit comments

Comments
 (0)