forked from syncfusion/ej2-aspnetcore-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTemplate.cshtml
60 lines (55 loc) · 2.17 KB
/
Template.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
49
50
51
52
53
54
55
56
57
58
59
60
@using Syncfusion.EJ2
@section ControlsSection{
<div class="control-section">
<div class="control_wrapper">
<ejs-treeview id="treedata" nodeTemplate="@Html.Raw("<div><div class=\"treeviewdiv\"><div style=\"float:left\"><span class=\"treeName\">${name}</span></div>${if(count)}<div style=\"margin-right: 5px; float:right\"><span class=\"treeCount e-badge e-badge-primary\" >${count}</span></div> ${/if} </div></div>")">
<e-treeview-fields dataSource="ViewBag.data" id="id" parentId="pid" text="name" hasChildren="hasChild" expanded="expanded" selected="selected"></e-treeview-fields>
</ejs-treeview>
</div>
</div>
}
@section Meta{
<meta name="description" content="The tree view node can be customized through the template option. In this demo the tree view nodes are templated like an mail system." />
}
@section ActionDescription{
<div id="action-description">
<p>This sample demonstrates the template functionalities of the TreeView. Select the root node by clicking on it, or expand the root node and select the customized child node.</p>
</div>
}
@section Description{
<div id="description">
<p>
The TreeView component has an option to customize the node structure through the nodeTemplate property, so that the tree node can be formed with any custom structure.
</p>
<p>
In this demo, the node is formed with the employee's image, name and designation.
</p>
<p>
More information about Treeview can be found in this
<a target="_blank"
href="https://ej2.syncfusion.com/aspnetcore/documentation/treeview/template/">
documentation section
</a>.
</p>
</div>
}
@*custom code start*@
<style>
.control_wrapper {
max-width: 320px;
margin: auto;
border: 1px solid #dddddd;
border-radius: 3px;
}
.e-treeview .e-list-text {
width: 100%;
}
.treeCount.e-badge {
padding: 0.4em;
vertical-align: text-bottom;
}
.material .treeCount.e-badge {
vertical-align: middle;
}
</style>
@*custom code end*@