Skip to content

Commit bcadc18

Browse files
committed
Sync with Kendo UI Professional
1 parent d577ea3 commit bcadc18

File tree

10 files changed

+345
-16
lines changed

10 files changed

+345
-16
lines changed

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

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ The action method which renders the view that contains the Grid may need additio
164164

165165
![{{ site.product_short }} A new entity data model](../images/grid-entity-data-model.png)
166166

167-
1. Pick the **Generate from database** option and click **Next**. Configure a connection to the Northwind database. Click **Next**.
167+
1. Pick the **EF Designer from database** option and click **Next**. Configure a connection to the Northwind database. Click **Next**.
168168

169-
![{{ site.product_short }} Choosing the connection](../images/grid-entity-data-model.png)
169+
![{{ site.product_short }} Choosing the connection](../images/grid-binding-choose-data-connection.png)
170170

171171
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**.
172172

173-
![{{ site.product_short }} Choosing the Products table in the database objects](../images/grid-database-objects.png)
173+
![{{ site.product_short }} Choosing the Products table in the database objects](../images/grid-binding-choose-database-objects.png)
174174

175175
1. Open **HomeController.cs** and modify the `Index` action method.
176176

@@ -183,22 +183,91 @@ The action method which renders the view that contains the Grid may need additio
183183
return View();
184184
}
185185

186+
1. Modify the `Create` method as demonstrated in the following example.
187+
188+
[AcceptVerbs(HttpVerbs.Post)]
189+
public ActionResult Create(Product product)
190+
{
191+
if (ModelState.IsValid)
192+
{
193+
productService.Create(product);
194+
195+
RouteValueDictionary routeValues = this.GridRouteValues();
196+
197+
return RedirectToAction("Index", routeValues);
198+
}
199+
200+
return View("Index", productService.GetAll());
201+
}
202+
203+
1. Modify the `Update` method as demonstrated in the following example.
204+
205+
[AcceptVerbs(HttpVerbs.Post)]
206+
public ActionResult Update(Product product)
207+
{
208+
if (ModelState.IsValid)
209+
{
210+
productService.Update(product);
211+
212+
RouteValueDictionary routeValues = this.GridRouteValues();
213+
214+
return RedirectToAction("Index", routeValues);
215+
}
216+
217+
return View("Index", productService.GetAll());
218+
}
219+
220+
1. Modify the `Destroy` method as demonstrated in the following example.
221+
222+
[AcceptVerbs(HttpVerbs.Post)]
223+
public ActionResult Destroy(int productID)
224+
{
225+
Product product = productService.GetAll().FirstOrDefault(p => p.ProductID == productID);
226+
227+
RouteValueDictionary routeValues;
228+
229+
if (product == null)
230+
{
231+
routeValues = this.GridRouteValues();
232+
233+
return RedirectToAction("Index", routeValues);
234+
}
235+
236+
productService.Destroy(product);
237+
238+
routeValues = this.GridRouteValues();
239+
240+
return RedirectToAction("Index", routeValues);
241+
}
242+
186243
1. Add a Kendo UI Grid to the `Index` view.
187244

188245
```Razor
189246
@(Html.Kendo().Grid((IEnumerable<KendoGridServerBinding.Models.Product>)ViewBag.Products) //Bind the grid to ViewBag.Products
190247
.Name("grid")
191248
.Columns(columns =>
192249
{
193-
// Create a column bound to the ProductID property.
194250
columns.Bound(product => product.ProductID);
195-
// Create a column bound to the ProductName property.
196251
columns.Bound(product => product.ProductName);
197-
// Create a column bound to the UnitsInStock property.
198252
columns.Bound(product => product.UnitsInStock);
253+
columns.Bound(product => product.Discontinued);
254+
columns.Command(commands =>
255+
{
256+
commands.Edit(); // The "edit" command will edit and update data items.
257+
commands.Destroy(); // The "destroy" command removes data items.
258+
}).Title("Commands").Width(300);
199259
})
260+
.ToolBar(commands => commands.Create())
200261
.Pageable() //Enable the paging.
201262
.Sortable() //Enable the sorting.
263+
.DataSource(dataSource => dataSource
264+
.Server()
265+
// Specify that the ProductID property is the unique identifier of the model.
266+
.Model(model => model.Id(p => p.ProductID))
267+
.Create(create => create.Action("Create", "Home"))
268+
.Update(update => update.Action("Update", "Home"))
269+
.Destroy(destroy => destroy.Action("Destroy", "Home"))
270+
)
202271
)
203272
```
204273
29.1 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Keyboard Navigation
3+
page_title: Keyboard Navigation
4+
description: "Get started with the {{ site.product }} Slider and learn about the accessibility support it provides through its keyboard navigation functionality."
5+
slug: keynav_aspnetcore_slider
6+
position: 2
7+
---
8+
9+
# Keyboard Navigation
10+
11+
The keyboard navigation of the {{ site.product }} Slider is always available.
12+
13+
For a complete example, refer to the [demo on keyboard navigation of the Slider](https://demos.telerik.com/{{ site.platform }}/slider/keyboard-navigation).
14+
15+
The Slider supports the following shortcuts:
16+
17+
| SHORTCUT | DESCRIPTION |
18+
|:--- |:--- |
19+
| `Alt + W` | Focuses the component. |
20+
| `Alt + Q` | Focuses the range slider. |
21+
| `Up Arrow` | Increments the value by a small step. |
22+
| `Down Arrow` | Decrements the value by a small step. |
23+
| `Left Arrow` | Decrements the value by a small step (equivalent to `Down Arrow`). |
24+
| `Right Arrow` | Increments the value by a small step (equivalent to `Up Arrow`). |
25+
| `Page Up` | Increments the value by a large step. |
26+
| `Page Down` | Decrements the value by a large step. |
27+
| `Home` | Moves the drag handle to the minimum value. |
28+
| `End` | Moves the drag handle to the maximum value. |
29+
| `Shift + Tab` | Tabs to first range slider draghandle or previous focusable page element. |
30+
31+
## See Also
32+
33+
* [Keyboard Navigation in the Slider HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/slider/keyboard-navigation)
34+
* [Accessibility in the Slider HtmlHelper for {{ site.framework }}]({% slug accessibility_aspnetcore_slider %})
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Overview
3+
page_title: Slider Accessibility
4+
description: "Get started with the {{ site.product }} Slider and learn about its accessibility support for WAI-ARIA, Section 508, and WCAG 2.2."
5+
slug: accessibility_aspnetcore_slider
6+
position: 1
7+
---
8+
9+
# Slider Accessibility
10+
11+
The Slider is accessible by screen readers and provides WAI-ARIA, Section 508, WCAG 2.2, and keyboard support.
12+
13+
For more information, refer to:
14+
* [Keyboard navigation by the Telerik UI Slider]({% slug keynav_aspnetcore_slider %})
15+
* [Accessibility in {{ site.product }}]({% slug overview_accessibility %})
16+
17+
## WAI-ARIA
18+
19+
The component follows the WAI-ARIA Authoring Practices for implementing the keyboard navigation for its component role and is tested against the popular screen readers. For more information, refer to the article on [WAI-ARIA support in {{ site.product }}]({% slug overview_accessibility %}#wai-aria).
20+
21+
## Section 508
22+
23+
The Slider is compliant with the Section 508 requirements. For more information, refer to the article on [Section 508 support in {{ site.product }}]({% slug overview_accessibility %}#section-508).
24+
25+
## WCAG 2.2
26+
27+
The Slider supports the standards for providing accessible web content which are set by the [Web Content Accessibility Guidelines 2.1](https://www.w3.org/TR/WCAG/). For more information, refer to the article on [WCAG 2.2 compliance in {{ site.product_short }} ]({% slug overview_accessibility %}#wcag-21)
28+
29+
## See Also
30+
31+
* [Keyboard Navigation by the Slider HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/slider/keyboard-navigation)
32+
* [Keyboard Navigation by the Slider HtmlHelper for {{ site.framework }}]({% slug keynav_aspnetcore_slider %})
33+
* [Accessibility in {{ site.product }}]({% slug compliance_accessibility %})

docs-aspnet/html-helpers/editors/slider/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The Slider configuration options are passed as attributes. The following example
9393

9494
* [Appearance]({% slug slider_appearance %})&mdash;Use different configuration settings that control the styling of the component.
9595
* [Events]({% slug events_slider %})&mdash;Handle the component events and implement any custom functionality.
96-
* [Accessibility](https://demos.telerik.com/{{ site.platform }}/slider/keyboard-navigation)&mdash;The Slider is accessible for screen readers, supports WAI-ARIA attributes, and delivers keyboard shortcuts for faster navigation.
96+
* [Accessibility]({% slug accessibility_aspnetcore_slider %})&mdash;The Slider is accessible for screen readers, supports WAI-ARIA attributes, and delivers keyboard shortcuts for faster navigation.
9797

9898
## Next Steps
9999

-21.7 KB
Loading

docs-aspnet/knowledge-base/repl-isolate-sample.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ https://netcorerepl.telerik.com/
2323

2424
Using this tool, you can demonstrate the issue in a live sample with several simple steps. Here is a sample process with a Grid and its Data Binding functionality.
2525

26-
1. Open the tool's web site:
26+
* Open the tool's web site:
2727
https://netcorerepl.telerik.com/
2828

29-
2. Add a Model class definition:
29+
* Add a Model class definition:
3030
```C#
3131
@using System.ComponentModel.DataAnnotations;
3232

@@ -44,7 +44,7 @@ https://netcorerepl.telerik.com/
4444
}
4545
```
4646

47-
3. Add the logic from your controller action :
47+
* Add the logic from your controller action :
4848
```C#
4949
@{
5050
// this part simulates Controller Read Action
@@ -60,7 +60,7 @@ https://netcorerepl.telerik.com/
6060
}
6161
```
6262

63-
4. Add the Grid definition, but instead of Read, use the BindTo property:
63+
* Add the Grid definition, but instead of Read, use the BindTo property:
6464
```Razor
6565
@(Html.Kendo().Grid<OrderViewModel>()
6666
.Name("Grid")
@@ -70,7 +70,6 @@ https://netcorerepl.telerik.com/
7070
columns.Bound(p => p.Freight);
7171
columns.Bound(p => p.OrderDate).Format("{0:MM/dd/yyyy}");
7272
columns.Bound(p => p.ShipName);
73-
columns.Bound(p => p.ShipName);
7473
columns.Bound(p => p.Active);
7574
})
7675
.Pageable()
@@ -89,18 +88,18 @@ https://netcorerepl.telerik.com/
8988
)
9089
```
9190

92-
5. Click Run and ensure the sample is working as expected:
91+
* Click Run and ensure the sample is working as expected:
9392

9493
![REPL Result](images/repl-result.png)
9594

96-
6. Modify the sample to reproduce the issue you are facing.
95+
* Modify the sample to reproduce the issue you are facing.
9796

98-
7. Click the "Share Snippet" button to generate a new URL of the REPL sample and send it in the ongoing thread:
97+
* Click the "Share Snippet" button to generate a new URL of the REPL sample and send it in the ongoing thread:
9998

10099
![REPL Share](images/repl-share.png)
101100

102101
Here is a link with the REPL of the entire sample:
103-
https://netcorerepl.telerik.com/mIPckNvk57VISrJ323
102+
https://netcorerepl.telerik.com/mSPclqOs53C10jIx47
104103

105104
## See Also
106105

docs-aspnet/vs-integration/troubleshooting.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,24 @@ If the target **Framework** dropdown doesn't allow you to select the desired fra
5353
1. Go to **Tools** > **Get Tools and Features**.
5454
1. In Visual Studio Installer, select the **Individual components** tab and check the .NET Framework 4.6.2 targeting pack and .NET Framework 4.6.2 SDK
5555

56+
{% if site.mvc %}
57+
58+
## Created project could not load file or assembly 'Telerik.SvgIcons'
59+
60+
When creating a new project using an older version of the components, there might be mismatch between the version of the installed VS Extentions and the older Telerik Icon assemblies required to build the specific old version of the toolset.
61+
62+
The error will show a message similar to this:
63+
64+
*Could not load file or assembly 'Telerik.SvgIcons, Version=4.0.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)*
65+
66+
You can fix the issue by opening the `.csproj` file of the project and updating the version of the Icon packages:
67+
```XML
68+
<PackageReference Include="Telerik.FontIcons" Version="4.0.0" />
69+
<PackageReference Include="Telerik.SvgIcons" Version="4.0.0" />
70+
```
71+
72+
{% endif %}
73+
5674
## See Also
5775

5876
* [Integrating Visual Studio in Your .Net Project (Overview)]({% slug overview_visualstudio_aspnetcore %})
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Checking If a Kendo UI ExpansionPanel Is Open
3+
description: Learn how to determine the expanded state of a Kendo UI ExpansionPanel for jQuery.
4+
type: how-to
5+
page_title: How to Check the Expansion State of a Kendo UI ExpansionPanel
6+
slug: how-to-check-expansionpanel-state-kendo-ui
7+
tags: kendo-ui, expansionpanel, jquery, state, expanded, collapsed
8+
res_type: kb
9+
ticketid: 1671321
10+
---
11+
12+
## Environment
13+
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>Kendo UI ExpansionPanel for Progress® Kendo UI®</td>
19+
</tr>
20+
<tr>
21+
<td>Version</td>
22+
<td>2024.4.1112</td>
23+
</tr>
24+
</tbody>
25+
</table>
26+
27+
## Description
28+
29+
I need to check if an ExpansionPanel is expanded or collapsed within my application. How can I achieve this?
30+
31+
This knowledge base article also answers the following questions:
32+
- How to determine if a Kendo UI ExpansionPanel is open?
33+
- How to programmatically check the state of a Kendo UI ExpansionPanel?
34+
35+
## Solution
36+
37+
To check the expanded or collapsed state of a Kendo UI ExpansionPanel, you can use custom logic. This approach involves checking for a specific class that indicates the panel's state. Although the Kendo UI ExpansionPanel does not provide a direct method to get its expanded state, the following steps allow you to determine it:
38+
39+
- Use jQuery to check if the panel has the class `.k-expanded`. This class is present when the panel is in its expanded state.
40+
41+
Here is an example of how you can implement this logic:
42+
43+
```dojo
44+
<button onclick="expandedState()">Get expanded state</button>
45+
</br>
46+
</br>
47+
<div id="expansionPanel">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
48+
</div>
49+
<script>
50+
$("#expansionPanel").kendoExpansionPanel({
51+
subTitle: "Lorem ipsum"
52+
});
53+
54+
function expandedState() {
55+
let expanded;
56+
if ($(".k-expander").hasClass("k-expanded")) {
57+
expanded = true;
58+
} else expanded = false;
59+
console.log("Exanded:", expanded)
60+
}
61+
</script>
62+
```
63+
64+
To programmatically toggle the state of the ExpansionPanel, use the `toggle()` method. For more information, refer to the [toggle() method documentation](https://docs.telerik.com/kendo-ui/api/javascript/ui/expansionpanel/methods/toggle).
65+
66+
## See Also
67+
68+
- [Kendo UI ExpansionPanel Toggle Method Documentation](https://docs.telerik.com/kendo-ui/api/javascript/ui/expansionpanel/methods/toggle)
69+
- [Kendo UI ExpansionPanel Overview](https://docs.telerik.com/kendo-ui/controls/navigation/expansionpanel/overview)

0 commit comments

Comments
 (0)