forked from syncfusion/ej2-aspnetcore-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataBinding.cshtml
48 lines (43 loc) · 1.53 KB
/
DataBinding.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@using Syncfusion.EJ2
@section ControlsSection{
<div class="control-section">
<div class="menu-control">
<ejs-menu id="menu" items="ViewBag.menuItems"></ejs-menu>
</div>
</div>
}
@section Meta{
<meta name="description" content="This example demonstrates how to bind local data source with Syncfusion ASP.NET Core Menu control." />
}
@section ActionDescription{
<div id="action-description">
<p>This sample demonstrates data source binding of the menu. Mouse hover or clicking the menu item displays the sub menu pop-up items.</p>
</div>
}
@section Description{
<div id="description">
<p>
The menu component loads the data through the <code>items</code> property, where the data can either be structured as hierarchical or self-referential data, i.e. mapped with id and parentId fields.
</p>
<p>
In this demo, the component is bound with the list type data where the parent-child relation is referred by id and parentId mapping fields.
</p>
<p>
More information about menu can be found in this
<a target="_blank" href="https://ej2.syncfusion.com/aspnetcore/documentation/menu/data-source-binding-and-custom-menu-items/#data-binding">
data binding
</a> section.
</p>
</div>
}
@*custom code start*@
<style>
.e-menu-wrapper {
text-align: center;
}
.menu-control {
margin-top: 45px;
text-align: center;
}
</style>
@*custom code end*@