- Home
- Forum
- ASP.NET Core - EJ 2
- On demand loading
On demand loading
This page of the documentation states that the TreeGrid component is capable of "on demand" loading of remote data:
https://ej2.syncfusion.com/aspnetcore/documentation/tree-grid/data-binding-core/?no-cache=1
Quote: "The TreeGrid provides Load on Demand support for rendering remote data."
I'm unable to use this feature. I tried to find this property in the javascript source (ej2.min.js), but it's not in there. My question is: is this functionality not implemented, or am I missing something?
SIGN IN To post a reply.
1 Reply
PK
Padmavathy Kamalanathan
Syncfusion Team
June 24, 2019 12:16 PM UTC
Hi Andras,
Thanks for contacting Syncfusion Forums.
QUERY: On demand loading
From your query we understand that, you need to use “on demand loading of remote data’. For using on demand loading, there is no need to enable any specific property. You just need to specify the type of adaptor you are using and the URL link.
But simply referring URL to TreeGrid DataManager would require two ajax posts. So to optimize it we need to set an optional property called “HasChildMapping“. Every record has a Boolean field that denotes whether it is a parent record. We need to map that field name to “HasChildMapping” property. Please refer following code example.
|
<ejs-treegrid id="TreeGrid" idMapping="TaskID" height="260" parentIdMapping="ParentItem" hasChildMapping="isParent" treeColumnIndex="1">
<e-data-manager url="https://ej2services.syncfusion.com/production/web-services/api/SelfReferenceData" adaptor="WebApiAdaptor" crossDomain="true"></e-data-manager>
<e-treegrid-columns>
-----------
</e-treegrid-columns>
</ejs-treegrid>
Example Data Source,
Parent Data:
|
Please refer the below link for understanding HasChildMapping property,
Please refer the below help documentation,
Also you can refer below demo sample for remote data,
If you have further queries, please get back to us.
Regards,
Padmavathy Kamalanathan
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
AN András
- Jun 21, 2019 04:07 PM UTC
- Jun 24, 2019 12:16 PM UTC