In the Load on Demand example here (http://www.igniteui.com/tree-grid/load-on-demand) is it possible to create the grid using PHP and also have searching capabilities for the grid?
Thanks
Hello Nifty,
Yes. It is possible. The treegrid sends the remote request to load the data on demand in the following format : ? path = (primaryKey of root)/(primaryKey of parent)/… & depth=(depth of the currently bound level). So you’ll have that information on the server side and based on it you can return the json data which should be displayed on the related level.
For instance in the online sample at http://www.igniteui.com/tree-grid/load-on-demand when expanding the following request is send: ChildEmployeesOnDemand?path=381&depth=0&pk=ID&expand=true
Where 381 is the primary key of the row and the depth of the currently expanded row, which is 0 (since this is the root level).
On the server side based on those parameters sent as part of the query string, you can build the Json data for the particular child rows.
For details refer to the following article from our documentation:
http://www.igniteui.com/help/igtreegrid-load-on-demand
If you want to enable other remote operations like sorting, filtering or paging you would need to handle the remote operations in a similar way – by getting the related parameters from the request’s query string , applying the related operation manually on the data and returning that data in Json format to the client so the grid can bind to it.
There’s a similar example of how remote features can be handled here:
http://www.igniteui.com/tree-grid/remote-features
We plan on providing MVC wrappers for the TreeGrid that would handle remote operations out of the box, however at this time there are no plans on adding PHP wrappers.
So you'll need to handle the server side data manipulation manually.
Please let me know if you have any questions.
Best Regards,
Maya Kirova
Hi Maya,
Is it possible for you to upload a simple example for "Load On Demand" or "Remote Features" Tree grid with JSON data that is pure JS and JSON and not ASP.net? I just wanted to understand this in a basic fashion.
I have uploaded an example that I am working with and I am not able to get it working, using the documentation provided.. You can download the example here:
http://s000.tinyupload.com/index.php?file_id=14634908027888837944
The First AJAX request should go to level0.json and should load the name and description from there.
When the parent on the first level is clicked, it should make an AJAX request to level1.json.
When the parent on the third level is clicked, it should make an AJAX request to level2.json.
I really appreciate if you can make the required changes to this example to present it in a treegrid on demand.