You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-aspnet/backwards-compatibility/2022-backwards-compatibility.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ As of the 2022 R1 SP2 release the `Shape` configuration option of the Button com
70
70
71
71
**Scheduler**
72
72
73
-
As of the 2022 R1 SP1 release the Scheduler exposes a modified keyboard navigation behavior. The main reason behind the change is to make the widget a single Tab stop element on the page. This would allow easier navigation to and away from the Scheduler. Further details on the new keyboard navigation behavior could be found on the [Keyboard Navigation demo](https://demos.telerik.com/{{ site.platform }}/scheduler/selection).
73
+
As of the 2022 R1 SP1 release the Scheduler exposes a modified keyboard navigation behavior. The main reason behind the change is to make the widget a single Tab stop element on the page. This would allow easier navigation to and away from the Scheduler. Further details on the new keyboard navigation behavior could be found on the [Keyboard Navigation demo](https://demos.telerik.com/{{ site.platform }}/scheduler/keyboard-navigation).
Copy file name to clipboardExpand all lines: docs-aspnet/html-helpers/helper-basics/content-security-policy.md
+62-31Lines changed: 62 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -60,9 +60,9 @@ Call the method after all components declarations to serialize the deferred init
60
60
61
61
### Creating Content Security Policy Templates
62
62
63
-
Most of the components support templating options, which use the [Kendo UI Templates syntax](https://docs.telerik.com/kendo-ui/framework/templates/overview), for example, [Grid templates]({% slug htmlhelpers_grid_aspnetcore_templates_overview %}), [DropDownList templates]({% slug htmlhelpers_dropdownlist_templates_aspnetcore %}), and more. To avoid using the [inline](https://docs.telerik.com/kendo-ui/framework/templates/get-started-inline) and [external](https://docs.telerik.com/kendo-ui/framework/templates/get-started-external) Kendo UI templates and remove the `unsafe-eval` keyword from the `meta` tag of your Telerik UI for {{ site.framework }} application, you can define the templates in partial views and load them by using the overload of the template option that accepts {% if site.core %}`IHtmlContent`{% else %}`MvcHtmlString`{% endif %}. For more information on the CSP-Compatible templates, [refer to the Client Templates section]().
63
+
Most of the components support templating options, which use the [Kendo UI Templates syntax](https://docs.telerik.com/kendo-ui/framework/templates/overview), for example, [Grid templates]({% slug htmlhelpers_grid_aspnetcore_templates_overview %}), [DropDownList templates]({% slug htmlhelpers_dropdownlist_templates_aspnetcore %}), and more. To avoid using the [inline](https://docs.telerik.com/kendo-ui/framework/templates/get-started-inline) and [external](https://docs.telerik.com/kendo-ui/framework/templates/get-started-external) Kendo UI templates and remove the `unsafe-eval` keyword from the `meta` tag of your Telerik UI for {{ site.framework }} application, you can define the templates in partial views and load them by using the overload of the template option that accepts {% if site.core %}`IHtmlContent`{% else %}`MvcHtmlString`{% endif %}. For more information on the CSP-compatible templates, [refer to the CSP-compatible templates section]({% slug client_templates_overview %}#content-security-policy-csp-templates).
64
64
65
-
The example below demonstrates how to define a CSP-Compatible[client detail template of a Grid]({% slug clientdetailtemplate_grid_aspnetcore %}).
65
+
The example below demonstrates how to define a CSP-compatible[client detail template of a Grid]({% slug clientdetailtemplate_grid_aspnetcore %}). You can pass either the relative or absolute path to the partial view in the `ClientDetailTemplateView` method.
66
66
67
67
{% if site.core %}
68
68
```HtmlHelper
@@ -74,17 +74,69 @@ The example below demonstrates how to define a CSP-Compatible [client detail tem
.ClientDetailTemplateView(await Html.PartialAsync("../GridPartials/DetailTemplate.cshtml")) // The "DetailTemplate.cshtml" is added in "~/Views/GridPartials/" directory.
.ClientDetailTemplateView(Html.Partial("../GridPartials/DetailTemplate.cshtml")) // The "DetailTemplate.cshtml" is added in "~/Views/GridPartials/" directory.
@@ -121,36 +173,14 @@ The example below demonstrates how to define a CSP-Compatible [client detail tem
121
173
})
122
174
.DataSource(dataSource => dataSource
123
175
.Ajax()
176
+
.PageSize(20)
124
177
.Read(read => read.Action("Products_Read", "Home", new { categoryId = "#=CategoryID#" }))
125
178
)
126
179
.Pageable()
180
+
.ToClientTemplate()
127
181
)
128
182
```
129
183
130
-
Alternatively, you can rewrite all [inline](https://docs.telerik.com/kendo-ui/framework/templates/get-started-inline) and [external](https://docs.telerik.com/kendo-ui/framework/templates/get-started-external) templates into [CSP-compatible functional templates](https://docs.telerik.com/kendo-ui/framework/templates/get-started-csp-templates).
The engine for the [inline](https://docs.telerik.com/kendo-ui/framework/templates/get-started-inline) and [external](https://docs.telerik.com/kendo-ui/framework/templates/get-started-external) templates will remain available. However, if you are using the previous template syntax, you must include the `usafe-eval` directive in the `meta` tag.
155
185
156
186
## (Prior to R1 2023 SP1) Working with Telerik UI for {{ site.framework }} Components
@@ -204,6 +234,7 @@ The Telerik UI for {{ site.framework }} releases prior to the R1 2023 SP1 one do
* [Content Security Policy in Kendo UI for jQuery](https://docs.telerik.com/kendo-ui/troubleshoot/content-security-policy)
208
239
* [Getting Started with Content Security Policy (CSP) Templates in Kendo UI for jQuery](https://docs.telerik.com/kendo-ui/framework/templates/get-started-csp-templates)
Copy file name to clipboardExpand all lines: docs-aspnet/html-helpers/helper-basics/fundamentals-mvc.md
+4-18Lines changed: 4 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ To defer individual components:
90
90
@Html.Kendo().DeferredScriptsFor("age", false)
91
91
</script>
92
92
93
-
* Use the `DeferredScriptFile` method to serialize the deferred initialization script to a file.
93
+
* Use the `DeferredScriptFile` method to serialize the deferred initialization script to a file. The method simulates loading the initialization scripts as a `JS` file through an `HttpModule`. To use this feature, enable the required settings described in the [deferring components globally section](#deferring-components-globally).
94
94
95
95
@Html.Kendo().DeferredScriptFile()
96
96
@@ -124,7 +124,8 @@ To defer components globally:
124
124
</configuration>
125
125
```
126
126
127
-
1. Serialize the script tag into a file by adding `@(Html.Kendo().DeferredScriptFile())` after all components declarations. Any components registered after it will not be included in the script.
127
+
1. Serialize the script tag into a file by adding `@(Html.Kendo().DeferredScriptFile())` after all components declarations.
128
+
Any components registered after it will not be included in the script.
128
129
129
130
Alternatively, call the `DeferredScripts` method to format the components scripts as inline script.
130
131
@@ -228,22 +229,6 @@ If you have deferred the initialization of the component, make sure you get its
228
229
});
229
230
</script>
230
231
231
-
## Using Client Templates
232
-
233
-
By default, every Telerik UI helper renders a script element with an initialization statement. If the helper declaration is placed inside a Kendo UI template, the nested script elements will be invalid. The `ToClientTemplate` method instructs the helper to escape its own script element so that it can be nested.
Copy file name to clipboardExpand all lines: docs-aspnet/html-helpers/helper-basics/fundamentals.md
+14-70Lines changed: 14 additions & 70 deletions
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,8 @@ To defer individual components:
131
131
@Html.Kendo().DeferredScriptsFor("age", false)
132
132
</script>
133
133
134
-
* Use the `DeferredScriptFile` method to serialize the deferred initialization script to a file.
134
+
* Use the `DeferredScriptFile` method to serialize the deferred initialization script to a file. The method simulates loading the initialization scripts as a `JS` file through a middleware. To use this feature, enable the required settings described in the [deferring components globally section](#deferring-components-globally).
135
+
135
136
136
137
@Html.Kendo().DeferredScriptFile()
137
138
@@ -144,6 +145,17 @@ To defer components globally:
144
145
145
146
1. Enable the `DeferToScriptFiles` setting in the `AddKendo` method that registers the Kendo UI service.
146
147
148
+
* For applications using .NET 6 or later and the [minimal hosting model](https://docs.microsoft.com/en-us/aspnet/core/migration/50-to-60?view=aspnetcore-6.0&tabs=visual-studio#new-hosting-model), the `AddKendo` method is defined in the `Program.cs` file.
149
+
150
+
```
151
+
var builder = WebApplication.CreateBuilder(args);
152
+
153
+
builder.Services.AddKendo(x =>
154
+
{
155
+
x.DeferToScriptFiles = true;
156
+
});
157
+
```
158
+
147
159
* For applications using .NET 5 or earlier, the `AddKendo` method is defined in the `ConfigureServices` method in the `Startup.cs` file.
148
160
149
161
```
@@ -156,17 +168,6 @@ To defer components globally:
156
168
}
157
169
```
158
170
159
-
* For applications using .NET 6 or later and the [minimal hosting model](https://docs.microsoft.com/en-us/aspnet/core/migration/50-to-60?view=aspnetcore-6.0&tabs=visual-studio#new-hosting-model), the `AddKendo` method is defined in the `Program.cs` file.
160
-
161
-
```
162
-
var builder = WebApplication.CreateBuilder(args);
163
-
164
-
builder.Services.AddKendo(x =>
165
-
{
166
-
x.DeferToScriptFiles = true;
167
-
});
168
-
```
169
-
170
171
1. Set the `KendoDefferedScriptsMiddleware` middleware. After the compilation of the views, all scripts are stored in the memory cache. When the browser requests the dynamic `js` file, this middleware handles the request and returns the cached scripts.
171
172
172
173
```
@@ -281,65 +282,8 @@ If you have deferred the initialization of the component, make sure you get its
281
282
282
283
```
283
284
284
-
## Using Client Templates
285
-
286
-
The Telerik UI for ASP.NET Core enables you to implement client templates for its [HTML Helper](#html-helper-client-templates) and [Tag Helper](#tag-helper-client-templates) components.
287
-
288
-
### HTML Helper Client Templates
289
-
290
-
By default, every Telerik UI helper renders a script element with an initialization statement. If the helper declaration is placed inside a Kendo UI template, the nested script elements will be invalid. The `ToClientTemplate` method instructs the helper to escape its own script element so that it can be nested.
var template = kendo.template($("#template").html());
302
-
$("#container").append( template ({}) );
303
-
})
304
-
</script>
305
-
306
-
### Tag Helper Client Templates
307
-
308
-
Тhe .NET framework ignores any Tag Helpers which are within script tags. In order to compile them correctly, when placing a Tag Helper within a Kendo Template, set the type to `text/html` and add the `is-in-client-template="true"` attribute.
309
-
310
-
The following example demonstrates how to include Chart TagHelpers in the TileLayout TagHelper.
0 commit comments