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/layout/window/positioning.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@ You can dynamically adjust the position of the Window by using its [API](/api/wi
12
12
13
13
Usually, it is preferable to center the Window rather than open it near the HTML element which is used to define its content. Often, the Window is opened as a result of a user action rather than of the `load` event of the page. Basically, the widget can be initialized as non-visible and can be opened when needed.
14
14
15
-
The following example demonstrates how to center and open a Kendo UI for jQuery Window on a button click. If the content is loaded through Ajax, [centering occurs after the request is complete]({% slug htmlhelpers_window_loadingcontent_aspnetcore %}#load-on-demand-content).
15
+
## Centered Window
16
+
17
+
The following example demonstrates how to center and open a Window component with a button click. If the Window's content is loaded through AJAX, [the centering occurs after the request is complete]({% slug htmlhelpers_window_loadingcontent_aspnetcore %}#load-on-demand-content).
16
18
17
19
```HtmlHelper
18
20
@(Html.Kendo().Window()
@@ -54,6 +56,30 @@ The following example demonstrates how to center and open a Kendo UI for jQuery
54
56
55
57
```
56
58
59
+
## Custom Positioned Window
60
+
61
+
To set a custom position of the Window, use the [`Position()`](https://docs.telerik.com/{{ site.platform }}/api/kendo.mvc.ui.fluent/windowbuilder#positionsystemaction) option.
@@ -228,6 +247,17 @@ public ActionResult Read_TreeViewData(int? id)
228
247
{% endif %}
229
248
230
249
250
+
```HierarchicalViewModel
251
+
public class HierarchicalViewModel
252
+
{
253
+
public int ID { get; set; }
254
+
public int? ParentID { get; set; }
255
+
public bool HasChildren { get; set; }
256
+
public string Name { get; set; }
257
+
public bool Expanded { get; set; }
258
+
public string ImageUrl { get; set; }
259
+
}
260
+
```
231
261
232
262
By default, the TreeView sends to the remote endpoint the `id` of the expanded node. To [send additional data]({% slug htmlhelpers_datasource_aspnetcore %}#pass-additional-data-to-action-methods) use the DataSource `Data` method and provide the name of a JavaScript function which will return a JavaScript object with the additional data.
0 commit comments