Skip to content

Commit 0f9b25d

Browse files
committed
Sync with Kendo UI Professional
1 parent fa30af6 commit 0f9b25d

File tree

10 files changed

+119
-13
lines changed

10 files changed

+119
-13
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The two alternative approaches for adding Telerik UI for ASP.NET Core to a new R
3333

3434
## Adding Components to a Razor Page
3535

36-
All Telerik UI for ASP.NET Core components are compatible with the ASP.NET Razor Pages framework. The following example demonstrates how to add a Grid to a Razor page and configure its CRUD operations.
36+
All Telerik UI for ASP.NET Core components are compatible with the ASP.NET Razor Pages framework. The following example demonstrates how to add a Grid, which is a commonly used ASP.NET Core Razor component, to a Razor page and configure its CRUD operations.
3737

3838

3939
1. Add the `@model` directive and an AntiForgeryToken on top of the Razor page:
@@ -217,7 +217,7 @@ All Telerik UI for ASP.NET Core components are compatible with the ASP.NET Razor
217217
218218
## Post data from a Razor Page
219219
220-
You can post data to the PageModel by binding the model properties to editors and submitting the entire model through a form. The example below demonstrates how to post the selected option from the [AutoComplete component]({% slug htmlhelpers_autocomplete_aspnetcore %}) to the PageModel:
220+
You can post data to the PageModel by binding the model properties to ASP.NET Core Razor components that serve as editors and submitting the entire model through a form. The example below demonstrates how to post the selected option from the [AutoComplete component]({% slug htmlhelpers_autocomplete_aspnetcore %}) to the PageModel:
221221
222222
```tab-HtmlHelper-RazorPage(csthml)
223223
@page
@@ -303,7 +303,7 @@ For more information on the model binding in Razor Pages application, refer to [
303303

304304
## GitHub Repo with Razor Pages Examples
305305

306-
A sample project with Razor Pages examples, which demonstrates the usage of the Telerik UI for ASP.NET Core components, is located in the [ASP.NET Core Examples](https://github.com/telerik/ui-for-aspnet-core-examples) repository on GitHub.
306+
A sample project with Razor Pages examples, which demonstrates the usage of the Telerik UI for ASP.NET Core Razor components, is located in the [ASP.NET Core Examples](https://github.com/telerik/ui-for-aspnet-core-examples) repository on GitHub.
307307

308308
## Razor Pages Examples
309309

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,10 @@ The Grid configuration options are passed as attributes of the helper. The Grid
196196

197197
* [Knowledge Base Section](/knowledge-base)
198198
* [Server-Side API](/api/grid)
199+
* [ASP.NET {{ site.framework_short }} Grid example](https://demos.telerik.com/{{ site.platform }}/grid)
199200
{% if site.core %}
200201
* [Forum Discussions](https://www.telerik.com/forums/aspnet-core-ui?tagId=753)
201-
* [Demos](https://demos.telerik.com/aspnet-core/grid)
202202
{% else %}
203203
* [Forum Discussions](https://www.telerik.com/forums/aspnet-mvc?tagId=754)
204-
* [Demos](https://demos.telerik.com/aspnet-mvc/grid)
205204
{% endif %}
206205
* [How-To Examples](https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas)

docs-aspnet/html-helpers/editors/dropdownlist/binding/ajax-binding.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ position: 2
99

1010
# Ajax Binding
1111

12+
In this article you will learn how to bind a DropDownList in ASP.NET Core from a database.
13+
1214
You can configure the Telerik UI DropDownList for Ajax binding to the Northwind **Products** table which uses Linq to SQL.
1315

14-
> The `ToDataSourceResult()` extension method modifies the structure of the result and the widget is not able to bind to it. In this case, return a simple array of data.
16+
> The `ToDataSourceResult()` extension method modifies the structure of the result and the widget is not able to bind to it. In this case, return a simple array of data as json.
1517
1618
1. Create an action method which renders the view.
1719

@@ -69,6 +71,9 @@ You can configure the Telerik UI DropDownList for Ajax binding to the Northwind
6971
</kendo-dropdownlist>
7072
```
7173
{% endif %}
74+
75+
By following this example, you will be able to populate the ASP.NET Core DropDownList from a database, and the component will visualize the data.
76+
7277
## See Also
7378

7479
* [Server-Side API](/api/dropdownlist)

docs-aspnet/html-helpers/editors/dropdownlist/binding/model-binding.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,5 @@ You can configure the DropDownList to get its data from a remote source by makin
112112
113113
## See Also
114114
115+
* [ASP.NET {{ site.framework_short }} DropDownList from database]({%slug htmlhelpers_dropdownlist_ajaxbinding_aspnetcore %})
115116
* [Server-Side API](/api/dropdownlist)

docs-aspnet/html-helpers/editors/dropdownlist/binding/razor-page.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
title: Razor Pages
3-
page_title: Razor Pages
4-
description: "An example on how to configure the remote binding DataSource to populate the Telerik UI DropDownList component for {{ site.framework }} in a Razor Page."
3+
page_title: ASP.NET Core DropDownList Razor | Telerik UI for ASP.NET Core
4+
description: "Find out how to configure the ASP.NET Core DropDownList component in a Razor Pages scenario."
55
slug: htmlhelpers_dropdownlist_razorpage_aspnetcore
66
position: 3
77
---
88

9-
# DropDownList in Razor Pages
9+
# ASP.NET Core Razor DropDownList
1010

1111
Razor Pages is an alternative to the MVC pattern that makes page-focused coding easier and more productive. This approach consists of a `cshtml` file and a `cshtml.cs` file (by design, the two files have the same name).
1212

1313
You can seamlessly integrate the Telerik UI DropDownList for {{ site.framework }} in Razor Pages applications.
1414

15-
This article describes how to configure the DropDownList component in a Razor Pages scenario.
15+
This article describes how to configure the ASP.NET Core Razor DropDownList in a Razor Pages scenario.
1616

1717
For the complete project, refer to the [DropDownList in Razor Pages example](https://github.com/telerik/ui-for-aspnet-core-examples/blob/master/Telerik.Examples.RazorPages/Telerik.Examples.RazorPages/Pages/DropDownList/DropDownListCrudOps.cshtml).
1818

19-
In order to set up the DropDownList 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`).
19+
In order to set up the Razor DropDownList 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`).
2020

2121
```tab-HtmlHelper(csthml)
2222
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf

docs-aspnet/html-helpers/editors/dropdownlist/cascading.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,6 @@ The following example demonstrates how to configure the cascading functionality
142142

143143
## See Also
144144

145+
* [ASP.NET Core Cascading DropDownList](https://demos.telerik.com/{{ site.platform }}/dropdownlist/cascadingdropdownlist)
145146
* [Grouping by the DropDownList HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/dropdownlist/grouping)
146147
* [Server-Side API](/api/dropdownlist)

docs-aspnet/html-helpers/editors/dropdownlist/getting-started.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ You can continue experimenting with the code sample above by running it in the T
314314
315315
## See Also
316316
317+
{% if site.core %}
318+
* [ASP.NET Core demo](https://demos.telerik.com/{{ site.platform }}/dropdownlist)
319+
{% endif %}
317320
* [Using the API of the DropDownList for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/dropdownlist/api)
318321
* [Client-Side API of the DropDownList](https://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist)
319322
* [Server-Side API of the DropDownList](/api/dropdownlist)

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,12 @@ The DropDownList configuration options are passed as attributes.
235235
## Next Steps
236236

237237
* [Getting Started with the DropDownList]({% slug aspnetcore_dropdownlist_getting_started %})
238-
* [Basic Usage of the DropDownList HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/dropdownlist/index)
239238
{% if site.core %}
239+
* [ASP.NET Core demo](https://demos.telerik.com/{{ site.platform }}/dropdownlist)
240240
* [Basic Usage of the DropDownList TagHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/dropdownlist/tag-helper)
241241
* [DropDownList in Razor Pages]({%slug htmlhelpers_dropdownlist_razorpage_aspnetcore%})
242+
{% else %}
243+
* [ASP.NET MVC DropDownList Overview Demo](https://demos.telerik.com/{{ site.platform }}/dropdownlist)
242244
{% endif %}
243245

244246
## See Also

docs-aspnet/html-helpers/helper-basics/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Validation
33
page_title: Validation
44
description: "Get started with {{ site.product }} and use client-side validation."
55
slug: validation_aspnetmvc
6-
previous_url: /validation, /getting-started/validation, getting-started/helper-basics/validation
6+
previous_url: /validation, /getting-started/validation, /getting-started/helper-basics/validation
77
position: 5
88
---
99

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: Centering a Marker in Kendo UI Map on Zoom or Pan
3+
description: Learn how to keep a marker centered in the Kendo UI Map component as you pan or zoom.
4+
type: how-to
5+
page_title: How to Keep a Marker Centered in Kendo UI Map on Zoom and Pan
6+
slug: centering-a-marker-kendo-ui-map
7+
tags: kendo, ui, map, center, marker, zoom, pan
8+
res_type: kb
9+
ticketid: 1671377
10+
---
11+
12+
## Environment
13+
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>Progress® Kendo UI® Map</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+
Centering a marker in the visible view of the map, including when zooming or panning, is a common requirement for applications using maps to ensure that a specific location remains in focus. This knowledge base article also answers the following questions:
30+
- How do I ensure a marker stays centered in Kendo UI Map?
31+
- What is the method to keep a marker centered during map navigation?
32+
- Can I auto-center a marker on map zoom or pan events?
33+
34+
## Solution
35+
36+
To center a marker in the Kendo UI Map and keep it centered during zoom and pan operations, use the [center()](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/map/methods/center) method of the map. This method allows you to set or get the center of the map. To maintain the centered marker when the map is zoomed or panned, apply logic inside the [`zoomEnd`](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/events/zoomend) and [`panEnd`](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/events/panend) event handlers of the map.
37+
38+
Below is the JavaScript code that demonstrates how to implement this functionality:
39+
40+
```dojo
41+
<div id="map"></div>
42+
<script>
43+
function createMap() {
44+
$("#map").kendoMap({
45+
center: [30.268107, -97.744821],
46+
zoom: 3,
47+
layers: [{
48+
type: "tile",
49+
urlTemplate: "https://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
50+
subdomains: ["a", "b", "c"],
51+
attribution: "&copy; <a href='https://osm.org/copyright'>OpenStreetMap contributors</a>"
52+
}],
53+
markers: [{
54+
location: [30.268107, -97.744821],
55+
shape: "pinTarget",
56+
tooltip: {
57+
content: "Austin, TX"
58+
}
59+
}],
60+
zoomEnd: onZoomEnd,
61+
panEnd: onPanEnd
62+
});
63+
64+
let map = $("#map").data("kendoMap");
65+
map.markers.clear();
66+
map.markers.add({location: map.center()});
67+
68+
function onZoomEnd(e) {
69+
let mapCenter = e.sender.center();
70+
setCenterMarker(mapCenter);
71+
}
72+
73+
function onPanEnd(e) {
74+
let mapCenter = e.sender.center();
75+
setCenterMarker(mapCenter);
76+
}
77+
78+
function setCenterMarker(mapCenter) {
79+
let map = $("#map").data("kendoMap");
80+
map.markers.clear();
81+
map.markers.add({location: mapCenter});
82+
}
83+
}
84+
$(document).ready(createMap);
85+
</script>
86+
```
87+
88+
This script first clears any existing markers and places a new marker at the center of the map. It then defines functions to handle the `zoomEnd` and `panEnd` events, ensuring the marker remains centered by setting it to the new center after each event. The `setCenterMarker` function updates the marker's position to the map's center.
89+
90+
## See Also
91+
92+
- [Kendo UI Map Center Method](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/map/methods/center)
93+
- [Kendo UI Map zoomEnd Event](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/map/events/zoomend)
94+
- [Kendo UI Map panEnd Event](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/map/events/panend)
95+
- [Kendo UI Map Documentation](https://docs.telerik.com/kendo-ui/controls/map/overview)

0 commit comments

Comments
 (0)