forked from syncfusion/ej2-aspnetcore-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRemoteData.cshtml
58 lines (55 loc) · 2.58 KB
/
RemoteData.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
@using Syncfusion.EJ2
@section ControlsSection{
<div class="col-lg-12 control-section">
<div class="control_wrapper">
<ejs-treeview id="tree">
<e-treeview-fields child="ViewBag.child" query="new ej.data.Query().from('Employees').select('EmployeeID,FirstName,Title').take(5)" id="EmployeeID" text="FirstName" hasChildren="EmployeeID" >
<e-data-manager url="https://services.odata.org/V4/Northwind/Northwind.svc" adaptor="ODataV4Adaptor" crossDomain="true"></e-data-manager>
</e-treeview-fields>
</ejs-treeview>
</div>
</div>
@*custom code start*@
<style>
.control_wrapper {
max-width: 500px;
min-height: 50px;
margin: auto;
border: 1px solid #dddddd;
border-radius: 3px;
}
</style>
@*custom code end*@
}
@section Meta{
<meta name="description" content="This demo demonstrates the binding of data to the tree view from remote data source." />
}
@section ActionDescription{
<div id="action-description">
<p>This sample demonstrates the binding data to the TreeView from remote data source. On expanding the parent node, the spinner icon will be displayed until the child nodes will be loaded into parent node. Click on node to select it, and click on icon or double click on node to expand/collapse it.</p>
</div>
}
@section Description{
<div id="description">
<p>
The TreeView component loads the data through the dataSource property, where the data can be either local data or remote data. In case of remote data, the data can be loaded from any remote services though the DataManager.
</p>
<p>
The DataManager will act as an interface between the service endpoint and the TreeView, that requires the below minimal information to interact with the service endpoint.
</p>
<p>
DataManager->url - Defines the service endpoint to fetch data.
DataManager->adaptor - Defines the adaptor option. By default, ODataV4Adaptor is used for remote binding.
</p>
<p>
In this demo, the TreeView is bound with the dataSource from the Northwind remote service by using the DataManager instance.
</p>
<p>
More information about Treeview can be found in this
<a target="_blank"
href="https://ej2.syncfusion.com/aspnetcore/documentation/treeview/data-binding/#remote-data">
documentation section
</a>.
</p>
</div>
}