Repository navigation
Expand file tree
/
Copy pathlocaldata.html
More file actions
40 lines (38 loc) · 1.71 KB
/
Copy pathlocaldata.html
File metadata and controls
40 lines (38 loc) · 1.71 KB
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
<div class="col-lg-12 control-section">
<div class='col-lg-6 nested-data'>
<div class='content'>
<h4>Hierarchical Data</h4>
<!-- Initialize TreeView -->
<div id="tree"></div>
</div>
</div>
<div class='col-lg-6 list-data'>
<div class='content'>
<h4>List Data</h4>
<!-- Initialize TreeView -->
<div id="listtree"></div>
</div>
</div>
</div>
<style>
.nested-data, .list-data {
padding: 15px;
margin-bottom: 25px;
}
.content {
margin: 0 auto;
border: 1px solid #dddddd;
border-radius: 3px;
}
.content h4 {
padding: 0 10px;
}
</style>
<div id="action-description">
<p>This sample demonstrates the binding of local data to the TreeView. Click on node to select it, and click on icon or double click on node to expand/collapse it.</p>
</div>
<div id="description">
<p>The TreeView component loads the data through the <code>dataSource</code> property, where the data can be either local data or remote data. In case of local data, the data structure can be hierarchical data or list data (with self-referential format i.e., mapped with the <b>id</b> and <b>parentID</b> fields).</p>
<p>In this demo, the first TreeView is bound with the hierarchical data that contains array of nested objects. And the second TreeView is bound with the list type data where the parent-child relation is referred by the <b>id</b> and <b>parentID</b> mapping fields.</p>
<p>For more information, you can refer to the <a href="http://ej2.syncfusion.com/documentation/treeview/data-binding.html" target="_blank">Data Binding</a> section from the documentation.</p>
</div>