Skip to content

Commit 7a0e55b

Browse files
committed
Sync with Kendo UI Professional
1 parent f2b9fc0 commit 7a0e55b

File tree

13 files changed

+148
-24
lines changed

13 files changed

+148
-24
lines changed

docs-aspnet/getting-started-core/razor-pages.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ The ASP.NET Razor Pages framework was introduced in ASP.NET Core 2.0 as an alter
1717
* The `@page` directive placed at the top of the page makes it a Razor Page. The page contains both HTML and server-side logic, which you include by using Razor syntax.
1818

1919
* The `@model` directive specifies the type of the data that the page is expected to work with. The page uses the PageModel class itself as a view model. The required data is exposed as properties.
20-
* The page handles requests directly, without using a controller. A naming convention is used to find the appropriate handler method to execute in the PageModel class. Handler methods are prefixed with the word `On` followed by the HTTP verb used for the request that they process: `OnGet`, `OnPost`, `OnGetAsync` and `OnPostAsync`. Following this convention, additional handlers can be included, for example `OnGetHelloWorld`.
20+
* The page handles requests directly, without using a controller. A naming convention is used to find the proper handler method to execute in the PageModel class. Handler methods are prefixed with the word `On` followed by the HTTP verb used for the request that they process: `OnGet`, `OnPost`, `OnGetAsync` and `OnPostAsync`. Following this convention, additional handlers can be included, for example `OnGetHelloWorld`.
2121
* Razor Pages automatically implement anti-forgery validation, which protects against cross-site request forgery (XSRF/CSRF) attacks.
2222

2323
You can find more information on Razor Pages in the [Microsoft Docs](https://docs.microsoft.com/en-us/aspnet/core/razor-pages/)
2424

2525
## Using Telerik UI for ASP.NET Core in a Razor Pages Project
2626

27-
There are two alternative approaches for adding Telerik UI for ASP.NET Core to a new Razor Pages project:
27+
The two alternative approaches for adding Telerik UI for ASP.NET Core to a new Razor Pages project are:
2828

2929
* Use the [Telerik Extensions for Visual Studio]({% slug newprojectwizards_visualstudio_aspnetcore %}) to create a new project. The [**GRID RAZOR PAGES**]({% slug newprojectwizards_visualstudio_aspnetcore %}#available-templates) template scaffolds a Razor Pages sample, which contains a Grid with enabled CRUD operations. The benefit of this approach is that the template will add the necessary configuration and dependencies automatically. You can focus on adding and configuring the UI components you need.
3030
* Use the default Visual Studio <a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start?view=aspnetcore-6.0&tabs=visual-studio" target="_blank">**ASP.NET Core Web App**</a> template, which is based on the ASP.NET Razor Pages framework. Do not use the **Web Application (Model-View-Controller)** template.
@@ -48,6 +48,19 @@ All Telerik UI for ASP.NET Core components are compatible with the ASP.NET Razor
4848
@Html.AntiForgeryToken()
4949
```
5050
51+
1. Configure the JSON serialization options of the application in the `Program.cs` file. For more information, refer to the [JSON Serialization article]({% slug jsonserialization_core %}).
52+
53+
```Program.cs
54+
55+
var builder = WebApplication.CreateBuilder(args);
56+
57+
// Add services to the container.
58+
builder.Services.AddRazorPages().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = null);
59+
builder.Services.AddKendo();
60+
...
61+
62+
```
63+
5164
1. Declare the Grid and setup the CRUD URLs in its `DataSource` configuration. Set the DataSource `Model.Id` configuration. The URL in these methods must refer to the name of the handler method in the `PageModel`:
5265
5366
@@ -304,7 +317,7 @@ Razor pages are automatically protected from [XSRF/CSRF](https://docs.microsoft.
304317

305318
## Known Limitations
306319

307-
Razor Pages use `Page` in their routing mechanism which interferes with `GET` requests made by the Kendo UI DataSource. As a result, only `POST` requests should be used when paging is required.
320+
Razor Pages use `Page` in their routing mechanism which interferes with `GET` requests made by the Kendo UI DataSource. As a result, only `POST` requests must be used when paging is required.
308321

309322
## See Also
310323

docs-aspnet/html-helpers/data-management/grid/context-menu.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ position: 15
88

99
# Context Menu
1010

11-
The {{site.product}} Grid provides a built-in ContextMenu to show the user available options, such as CRUD operations, selection and export options. A ContextMenu is shown when the user right-clicks on the Grid's table `body` or `head` elements.
11+
The {{site.product}} Grid provides a built-in ContextMenu to show the user available options, such as CRUD operations, selection and export options. The ContextMenu opens when the user right-clicks on the Grid's table `body` or `head` elements.
1212

1313
By default, the Context Menu of the Telerik UI Grid for {{ site.framework }} is disabled.
1414

@@ -118,7 +118,9 @@ The following example demonstrates how you can customize the Context Menu using
118118

119119
### Custom Commands
120120

121-
You can also register custom commands for the Context Menu. The following example demonstrates how to implement a custom command:
121+
You can also register custom commands for the Context Menu. To add custom commands in the ContextMenu that opens when the user right-clicks on the Grid's table `body` element, use the `Body()` configuration. To add custom commands in the ContextMenu that opens when the user right-clicks on the Grid's table `header` element, use the `Head()` configuration.
122+
123+
The following example demonstrates how to implement a custom command that appears in the table header ContextMenu.
122124

123125
```HtmlHelper
124126
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
@@ -127,7 +129,7 @@ You can also register custom commands for the Context Menu. The following exampl
127129
.Head(head => {
128130
head.Create();
129131
head.Separator();
130-
head.Custom("myTool").Text("My Tool).Icon("gear");
132+
head.Custom("myTool").Text("My Custom Tool").Icon("gear"); // "myTool" is the name of the command that will be displayed as "My Custom Tool".
131133
})
132134
)
133135
...
@@ -140,7 +142,7 @@ You can also register custom commands for the Context Menu. The following exampl
140142
<head>
141143
<context-menu-item name="create"/>
142144
<context-menu-item name="separator"/>
143-
<context-menu-item name="myTool" text="My Tool" icon="gear" command="myToolCommand"/>
145+
<context-menu-item name="myTool" text="My Custom Tool" icon="gear" command="myToolCommand"/> <!-- "myTool" is the name of the command that will be displayed as "My Custom Tool". -->
144146
</head>
145147
</context-menu>
146148
</kendo-grid>

docs-aspnet/html-helpers/editors/editor/tools.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ The following example demonstrates the default tool methods of the Editor.
4848
.FontName()
4949
.FontSize()
5050
.ForeColor()
51+
.FormatPainter()
5152
.BackColor()
5253
.Pdf()
5354
.Print()
@@ -152,6 +153,8 @@ The following example demonstrates the default tool methods of the Editor.
152153
</tool>
153154
<tool name="foreColor">
154155
</tool>
156+
<tool name="formatPainter">
157+
</tool>
155158
<tool name="backColor">
156159
</tool>
157160
<tool name="print">

docs-aspnet/html-helpers/layout/dialog/action-buttons.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,48 @@ position: 3
1010

1111
The Dialog action buttons allow you to provide specific interaction to users.
1212

13-
Each button has a text and an action handler attached to it. Generally, each button closes the Dialog as its last action but you can cancel this from the custom action handler. The order of the values in the `Actions()` configuration method determines the order in which the action buttons are rendered in the Dialog. You can also define a button as `Primary(true)`.
13+
Each defined button has a text and an action handler attached to it. By default, the action buttons close the Dialog, but you can prevent the Dialog from closing by setting the respective action handler to return `false`.
14+
15+
```HtmlHelper
16+
@(Html.Kendo().Dialog()
17+
.Name("dialog")
18+
.Title("Software Update")
19+
...
20+
{
21+
actions.Add().Text("Ok");
22+
actions.Add().Text("Cancel").Action("onCancel");
23+
})
24+
)
25+
26+
<script type="text/javascript">
27+
function onCancel(e) {
28+
alert("Cancel action was clicked");
29+
return false; // Returning false will prevent the closing of the Dialog.
30+
}
31+
</script>
32+
```
33+
{% if site.core %}
34+
```TagHelper
35+
<kendo-dialog name="dialog" title="Software Update">
36+
<actions>
37+
<action text="Ok">
38+
</action>
39+
<action text="Cancel" action="onCancel">
40+
</action>
41+
</actions>
42+
<!-- Other configuration -->
43+
</kendo-dialog>
44+
45+
<script type="text/javascript">
46+
function onCancel(e) {
47+
alert("Cancel action was clicked");
48+
return false; // Returning false will prevent the closing of the Dialog.
49+
}
50+
</script>
51+
```
52+
{% endif %}
53+
54+
The order of the values in the `Actions()` configuration method determines the order in which the action buttons are rendered in the Dialog. You can also define a button as `Primary(true)`.
1455

1556
The following example demonstrates how to set three action buttons in a Dialog with a `stretched` layout. The last button has an `Action()` event handler attached and is set as `Primary(true)`.
1657

docs-aspnet/html-helpers/layout/form/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ The following example demonstrates custom validation of the `LastName` and `Reti
252252
}
253253
```
254254

255-
## Custom Validation
255+
## DataAnnotation Attributes
256256

257257
The Form component supports DataAnnotation attributes and will configure the editors and the built-in validation based on the DataAnnotation attributes set for the model properties. The following table summarizes the supported DataAnnotation attributes:
258258

docs-aspnet/html-helpers/layout/window/use-iframe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ position: 6
88

99
# Using iframe
1010

11-
You can force the Window to display its content in an `<iframe>` element by using the `Iframe(true)` configuration method.
11+
You can force the Window to display its content in an [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) element by using the `Iframe(true)` configuration method. In this case, the Window content will be loaded into an HTML page that is embedded into the current HTML page.
1212

13-
> * Loading HTML fragments (partial content) inside an `iframe` is not correct. iframe pages have to include a `DOCTYPE`, `html`, `head`, and `body` tags, just like a standard web page does.
14-
> * Avoid using iframes on iOS devices because they are not scrollable and always expand to match the content.
13+
> * Loading HTML fragments (partial content) inside an `iframe` is not correct. Like standard web pages, `iframe` pages have to include a `DOCTYPE`, `html`, `head`, and `body` tags.
14+
> * Avoid using an `iframe` on iOS devices because iOS devices do not support `iframe` scrolling and always expand to match the content.
1515
1616
The following example demonstrates how to access the `window` and `document` objects inside the `iframe`. To achieve this, the nested page has to belong to the same domain as the main page. The `iframe` is accessed through the `element` of the Window.
1717

docs-aspnet/installation/nuget-install.md

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

1212
This article describes how to configure your system for the Telerik NuGet source and then use it to install {{ site.product }} in your project.
1313

14-
[NuGet](https://www.nuget.org) is a popular .NET package manager. Telerik maintains a private NuGet feed with official {{ site.product }} releases and service packs. In the Telerik NuGet feed, you will see packages that your account has a license for; trials (active) and commerical (active and expired).
14+
[NuGet](https://www.nuget.org) is a popular .NET package manager. Telerik maintains a private NuGet feed with official {{ site.product }} releases and service packs. In the Telerik NuGet feed, you will see packages that your account has a license for; trials (active) and commercial (active and expired).
1515

1616
{% if site.core %}
1717
>tip Looking for a complete tutorial? Check out the [Getting Started guide that uses NuGet]({%slug gettingstarted_aspnetmvc6_aspnetmvc%}) to add Telerik UI to the project.
@@ -21,7 +21,9 @@ This article describes how to configure your system for the Telerik NuGet source
2121

2222
## Setting Up the Telerik NuGet Feed
2323

24-
The Telerik NuGet feed allows you instant access to various Telerik and Kendo packages that you can install in your project. Before you can use the Telerik NuGet Feed as a **Package source**, you must configure your machine by utilizing any of the following methods:
24+
The Telerik NuGet feed allows you instant access to various Telerik and Kendo packages that you can install in your project. You can access either the latest or older versions of the suites.
25+
26+
Before you can use the Telerik NuGet Feed as a **Package source**, you must configure your machine by utilizing any of the following methods:
2527

2628
* [Use the NuGet Package Manager in Visual Studio](#setup-with-the-nuget-package-manager).
2729

docs-aspnet/styles-and-layout/sass-themes/compatibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The following table lists the Telerik UI for {{ site.framework }} versions and t
1212

1313
| Telerik UI for {{ site.framework }} | Kendo UI Sass Themes |
1414
|:--- |:--- |
15+
| Telerik UI 2024.1.319 (2024.1.319) | @progress/kendo-theme-bootstrap@7.2.1<br>@progress/kendo-theme-classic@7.2.1<br>@progress/kendo-theme-default@7.2.1<br>@progress/kendo-theme-fluent@7.2.1<br>@progress/kendo-theme-material@7.2.1 |
1516
| Telerik UI 2024.1.130 (Q1 2024.1.130) | @progress/kendo-theme-bootstrap@7.2.0<br>@progress/kendo-theme-classic@7.2.0<br>@progress/kendo-theme-default@7.2.0<br>@progress/kendo-theme-fluent@7.2.0<br>@progress/kendo-theme-material@7.2.0 |
1617
| Telerik UI 2023.3.1114 (R3 2023 SP1) | @progress/kendo-theme-bootstrap@7.0.2<br>@progress/kendo-theme-classic@7.0.2<br>@progress/kendo-theme-default@7.0.2<br>@progress/kendo-theme-fluent@7.0.2<br>@progress/kendo-theme-material@7.0.2 |
1718
| Telerik UI 2023.3.1010 (R3 2023) | @progress/kendo-theme-bootstrap@7.0.1<br>@progress/kendo-theme-classic@7.0.1<br>@progress/kendo-theme-default@7.0.1<br>@progress/kendo-theme-fluent@7.0.1<br>@progress/kendo-theme-material@7.0.1 |

docs/api/javascript/ui/editor.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4727,6 +4727,25 @@ Defines text for search box placeholder.
47274727
});
47284728
</script>
47294729

4730+
### formattingMarksRefreshDelay `Number|Boolean` *(default: 250)*
4731+
4732+
The delay in milliseconds before the formatting marks are refreshed. This feature is useful for performance optimization as the formatting marks are re-rendered any time the user presses a key. If the user is typing very fast or holding down a key, the delay will prevent the re-rendering from being executed multiple times.
4733+
4734+
The visual effect from this configuration is that the marks will briefly disappear while the user is typing. You can set the value to `false` to fully turn off this behavior.
4735+
4736+
#### Example
4737+
4738+
<textarea id="editor"><p>Some text with several spaces that demonstrates<br /> the re-rendering of the marks.</p></textarea>
4739+
4740+
<script>
4741+
$(document).ready(function() {
4742+
$("#editor").kendoEditor({
4743+
tools: ["formattingMarks"],
4744+
formattingMarksRefreshDelay: false
4745+
});
4746+
});
4747+
</script>
4748+
47304749
### unsafeInline `Boolean` *(default: true)*
47314750

47324751
When set to false, the decoration applied by the Formatting tool dropdown will be skipped and the values will appear as plain text options.

docs/api/javascript/ui/grid.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11244,9 +11244,9 @@ Hides the specified grid column.
1124411244
1124511245
#### Parameters
1124611246

11247-
##### column `Number|String|Object`
11247+
##### column `Number|String|Object|Array`
1124811248

11249-
The index of the column, or the [field](/api/javascript/ui/grid/configuration/columns.field) to which the columns is bound, or the column object obtained from the [columns](/api/javascript/ui/grid/fields/columns) collection.
11249+
The index of the column, or the [field](/api/javascript/ui/grid/configuration/columns.field) to which the columns is bound, or the column object obtained from the [columns](/api/javascript/ui/grid/fields/columns) collection, or array of indexes, or array of fields, or array of column objects obtained from the collection of columns, or array of mixed values.
1125011250

1125111251
When using multicolumn headers, using an index will hide a top-level column together with all its "child columns". In such scenarios, using field names or column objects may be more appropriate.
1125211252

@@ -11257,7 +11257,7 @@ When using multicolumn headers, using an index will hide a top-level column toge
1125711257
$("#grid").kendoGrid({
1125811258
columns: [
1125911259
{ field: "name" },
11260-
{ field: "age" }
11260+
{ field: "age" },
1126111261
],
1126211262
dataSource: [
1126311263
{ name: "Jane Doe", age: 30 },
@@ -11309,6 +11309,25 @@ When using multicolumn headers, using an index will hide a top-level column toge
1130911309
grid.hideColumn(grid.columns[0].columns[1]);
1131011310
</script>
1131111311

11312+
#### Example - hide a column by array of mixed values
11313+
11314+
<div id="grid"></div>
11315+
<script>
11316+
$("#grid").kendoGrid({
11317+
columns: [
11318+
{ field: "name" },
11319+
{ field: "age" },
11320+
{ field: "height" }
11321+
],
11322+
dataSource: [
11323+
{ name: "Jane Doe", age: 30, height: 1.75 },
11324+
{ name: "John Doe", age: 33, height: 1.82 }
11325+
]
11326+
});
11327+
var grid = $("#grid").data("kendoGrid");
11328+
grid.hideColumn([0, 'age']);
11329+
</script>
11330+
1131211331
### items
1131311332

1131411333
Obtains an Array of the DOM elements, which correspond to the data items from the Kendo UI DataSource [view](/api/javascript/data/datasource/methods/view) (e.g. the ones on the current page).
@@ -11979,9 +11998,9 @@ Shows the specified column.
1197911998
1198011999
#### Parameters
1198112000

11982-
##### column `Number|String|Object`
12001+
##### column `Number|String|Object|Array`
1198312002

11984-
The index of the column, or the [field](/api/javascript/ui/grid/configuration/columns.field) to which the columns is bound, or the column object obtained from the [columns](/api/javascript/ui/grid/fields/columns) collection.
12003+
The index of the column, or the [field](/api/javascript/ui/grid/configuration/columns.field) to which the columns is bound, or the column object obtained from the [columns](/api/javascript/ui/grid/fields/columns) collection, or array of indexes, or array of fields, or array of column objects obtained from the collection of columns, or array of mixed values.
1198512004

1198612005
When using multicolumn headers, using an index will hide a top-level column together with all its "child columns". In such scenarios, using field names or column objects may be more appropriate.
1198712006

@@ -12044,6 +12063,26 @@ When using multicolumn headers, using an index will hide a top-level column toge
1204412063
grid.hideColumn(grid.columns[0].columns[1]);
1204512064
</script>
1204612065

12066+
#### Example - show a hidden columns by array of mixed values
12067+
12068+
<div id="grid"></div>
12069+
<script>
12070+
$("#grid").kendoGrid({
12071+
columns: [
12072+
{ field: "name", hidden: true },
12073+
{ field: "age", hidden: true },
12074+
{ field: "height" }
12075+
],
12076+
dataSource: [
12077+
{ name: "Jane Doe", age: 30, height: 1.75 },
12078+
{ name: "John Doe", age: 33, height: 1.78 }
12079+
]
12080+
});
12081+
var grid = $("#grid").data("kendoGrid");
12082+
grid.showColumn([1, "age"]);
12083+
</script>
12084+
12085+
1204712086
### stickColumn
1204812087

1204912088
Sticks a column.

docs/styles-and-layout/sass-themes/compatibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The following table lists the Kendo UI for jQuery and Kendo UI Sass themes versi
1313

1414
| kendo UI for jQuery | Kendo UI Sass Themes |
1515
|:--- |:--- |
16+
| Kendo UI 2024.1.319 (2024.1.319) | @progress/kendo-theme-bootstrap@7.2.1<br>@progress/kendo-theme-classic@7.2.1<br>@progress/kendo-theme-default@7.2.1<br>@progress/kendo-theme-fluent@7.2.1<br>@progress/kendo-theme-material@7.2.1 |
1617
| Kendo UI 2024.1.130 (Q1 2024.1.130) | @progress/kendo-theme-bootstrap@7.2.0<br>@progress/kendo-theme-classic@7.2.0<br>@progress/kendo-theme-default@7.2.0<br>@progress/kendo-theme-fluent@7.2.0<br>@progress/kendo-theme-material@7.2.0 |
1718
| Kendo UI 2023.3.1114 (R3 2023 SP1) | @progress/kendo-theme-bootstrap@7.0.2<br>@progress/kendo-theme-classic@7.0.2<br>@progress/kendo-theme-default@7.0.2<br>@progress/kendo-theme-fluent@7.0.2<br>@progress/kendo-theme-material@7.0.2 |
1819
| Kendo UI 2023.3.1010 (R3 2023) | @progress/kendo-theme-bootstrap@7.0.1<br>@progress/kendo-theme-classic@7.0.1<br>@progress/kendo-theme-default@7.0.1<br>@progress/kendo-theme-fluent@7.0.1<br>@progress/kendo-theme-material@7.0.1 |

0 commit comments

Comments
 (0)