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/html-helpers/diagrams-and-maps/diagram/binding/razor-pages.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,6 @@ To enable CRUD operation in the Telerik UI Diagram within a `RazorPage`:
22
22
23
23
1. Setup CRUD URLs in the `DataSource` and `ConnectionsDataSource` along with a `Model.Id`. The URL in these methods must refer to the name of the method in the `PageModel`.
24
24
25
-
26
25
```HtmlHelper
27
26
.DataSource(d => d
28
27
.ShapeDataSource()
@@ -100,14 +99,14 @@ To enable CRUD operation in the Telerik UI Diagram within a `RazorPage`:
100
99
{% endif %}
101
100
1. Add an AntiForgeryToken on top of the `RazorPage`.
1. Send the AntiForgeryToken with each POST request of the page. Additional paratemers can also be supplied.
109
108
110
-
```
109
+
```javascript
111
110
<script>
112
111
function forgeryToken() {
113
112
return kendo.antiForgeryTokens();
@@ -117,7 +116,7 @@ To enable CRUD operation in the Telerik UI Diagram within a `RazorPage`:
117
116
1. Within the `.cs` file, introduce ActionMethod for each of the CRUD operations.
118
117
119
118
120
-
```
119
+
```csharp
121
120
public JsonResult OnPostReadShapes([DataSourceRequest] DataSourceRequest request)
122
121
{
123
122
return new JsonResult(DiagramShapes.ToDataSourceResult(request));
@@ -148,4 +147,8 @@ To enable CRUD operation in the Telerik UI Diagram within a `RazorPage`:
148
147
149
148
## See Also
150
149
151
-
* [Server-Side API](/api/diagram)
150
+
* [Using Telerik UI for ASP.NET Core in Razor Pages](https://docs.telerik.com/aspnet-core/getting-started/razor-pages#using-telerik-ui-for-aspnet-core-in-razor-pages)
151
+
* [Client-Side API of the Diagram](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram)
152
+
* [Server-Side HtmlHelper API of the Diagram](/api/diagram)
153
+
* [Server-Side TagHelper API of the Diagram](/api/taghelpers/diagram)
@@ -12,83 +12,139 @@ Razor Pages is an alternative to the MVC pattern that makes page-focused coding
12
12
13
13
You can seamlessly integrate the Telerik UI AutoComplete for {{ site.framework }} in Razor Pages applications.
14
14
15
-
This article showcases how to configure the AutoComplete component in a Razor Pages scenario.
15
+
This article demonstrates how to configure the AutoComplete component in a Razor Pages scenario.
16
16
17
17
For the complete project, refer to the [AutoComplete in Razor Pages example](https://github.com/telerik/ui-for-aspnet-core-examples/tree/master/Telerik.Examples.RazorPages/Telerik.Examples.RazorPages/Pages/AutoComplete).
18
18
19
19
## Getting Started
20
20
21
-
In order to set up the AutoComplete component bindings, you need to configure the `Read`method of its `DataSource` instance. The URL in this method should refer the name of the method in the PageModel. In this method, you can also pass additional parameters, such as filter string and antiforgery token (see `dataFunction`).
21
+
To configure the `Read`operation of the AutoComplete DataSource within a Razor Pages application, follow the next steps:
22
22
23
-
```tab-HtmlHelper(cshtml)
23
+
1. Specify the Read operation in the DataSource configuration. The URL must refer to the method name in the PageModel.
*[Using Telerik UI for ASP.NET Core in Razor Pages](https://docs.telerik.com/aspnet-core/getting-started/razor-pages#using-telerik-ui-for-aspnet-core-in-razor-pages)
144
+
*[Client-Side API of the AutoComplete](https://docs.telerik.com/kendo-ui/api/javascript/ui/autocomplete)
145
+
*[Server-Side HtmlHelper API of the AutoComplete](/api/autocomplete)
146
+
{% if site.core %}
147
+
*[Server-Side TagHelper API of the AutoComplete](/api/taghelpers/autocomplete)
0 commit comments