Hi Naresh,
We have analyzed your given requirement and it can be achieved in TreeGrid by using load on demand support. To enable “Load on Demand” feature, we required “hasChildMapping” API to identify the parent node and “enableLoadOnDemand” as true.
At initial, TreeGrid loaded with parent/root nodes in collapsed state from the remote server by using dataManager. After expand the parent record, corresponding child records are fetched from the webservice and added to respective parent record.
As we are using remote data, so we should be either mention crossDomain as true in DataManager or use enableLoadOnDemand as true.
Please refer following code snippet,
[html]
<ej-treegrid #TreeGridControl [dataSource]="datasource" [treeColumnIndex]=1
idMapping = "TaskID" parentIdMapping="ParentID" hasChildMapping="isParent"
enableVirtualization = "true" enableLoadOnDemand="true"
sizeSettings.height="450px" sizeSettings.width="100%" >
//…
</ej-treegrid>
[Ts]
public datasource = new ej.DataManager({
crossDomain: true
}); |
Please refer following document & online sample links,
We have also prepared a demo sample with remote data from online webservice. Please find the sample location as below,
Please let us know, if you require any other assistance.
Regards,
Jayakumar D