HiI want to know if its possible to to load on demand the child node of igTreeGrid?I saw this http://www.igniteui.com/help/igtreegrid-load-on-demand, but i thinks is out datedCan you show me a example with version 16.1?Thank you
Hello Pereira,
Thank you for providing the document link of igTreeGrid though I am afraid the link you provided is not outdated or an old version, even it is the most latest version 16.2 of Infragistics.
To refer the API document of igTreeGrid with version 16.1 you can refer the following link:
http://www.igniteui.com/help/igtreegrid-load-on-demand?v=16.1
Please note when you will open this link you can see there is a version link on very top of the page when you will click on that link you can see all the versions list out there and you can choose any specific version to get the document belongs to that version.
At the bottom of the document you will get the sample of load on demand at child level in igTreeGrid .
I can also provide you the link of the sample as:
http://www.igniteui.com/tree-grid/load-on-demand
Please let me know if you need further assistance.
Thank you for the responseBut there is only MVC example in documentation, there are some example using JQuery/HTML?Thanks
Hello Paulo,
The igTreeGrid Load on Demand feature allows for binding to a remote data source and only initially loading the visible data into the grid. Additional data is available by making remote requests for child records "on demand" as the parents are expanded that is why we have MVC sample with remote data source.
Load on demand doesn’t work on local data Source. In jQuery or html sample you can set initialExpandDepth property in the grid, this property specifies the depth down to which the tree grid would be expanded upon initial render. To expand all rows set value to -1. Default is -1.
To know more all the behaviors and property of igTreeGrid you can refer the following link:
http://www.igniteui.com/help/api/2015.2/ui.igtreegrid
HiThanks for your responseBut if i want to use AJAX to make a request to my API to get the child records, how can i do that?Thats my problem.Thank you
I found the another post where the other developer(Maya)has provided some more information regarding “Load On Demand” feature with ajax call .
Please refer the below post:
http://es.infragistics.com/community/forums/p/96905/478454.aspx#478454
And let me know if you need further assistance.
Hello, I am also interested in having load on demand for the child rows of the parent rows on the igTreeGrid. I tried to run the attached code from your last response but when I tried to expand the rows I got a CORS error because on the mocky endpoint you forgot to include in the header of the response the "Access-Control-Allow-Origin: *". I recreated that endpoint but this time with that property on the header as can be seen on this fiddle: http://jsfiddle.net/qggbs0s6/41/. The problem is that even though now I'm getting the response when I try to expand the child nodes, the treeGrid stays stuck with the loading gif and doesn't show the child nodes. I can see that the request is made with the developer tools and that the json is being properly returned but for some reason the treegrid isn't showing the child nodes. What am I doing wrong?Thanks in advance,João Paiva da Costa Pinto
Thank you for providing the sample application.
As per your requirement I would say you should make two separate server calls to get the parent as well as child data.In your first server call you sould have data for parent rows only with empty array for child rows and for second sever call grid will take care of fetching parent as well as child data.
I modified your sample to replicate the same scenario and in my first server call (as I don’t have mocky data) ,I have created local data (testDataA) for parent data and empty child array for child data and assigned it to dataSource.
Now on success, grid is making second sever call and passing the mocky data to dataSourceUrl.
You can run the attached sample and open the console(browser’s development tools) to test the behavior, you will see in the network tab only parent data row is being render in first server call and when you will expand the parent row server is making another call to get child records.
You can see request URL contain all the information as:
Request URL: http://www.mocky.io/v2/5835a8bb110000d6070bffb9?callback=??path=1&depth=0&pk=ID&propertyDataLevel=__ig_options.dataLevel&propertyExpanded=__ig_options.expanded&childDataKey=Employees&initialExpandDepth=0&loadOnDemand=true&expand=true
Please find the attached sample and let me know if you need further assistance.
I am discussing this behavior with the team and will let you know By Monday EOD as US office is closed from [11/24-11/27] due to thanksgiving holiday. I will review any updates if you have any on [11/28] and respond to you.
HiI built this example with igDataSource and igTreeGrid, but when i click to expand the parent in order to see the children it doesn't make another request to the server. In the initial loading of the parents it also loads the children.http://codepen.io/anon/pen/RoVBNE?editors=1010Thank you