Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
565
IgTree : Load on demand while expanding a node
posted

Hi,

I'd like to load all the childs elements only when i expand a particular node. What could be the proper way to do this ?

I'm guessing that i have to :

- Determine which nodes has some childs

- Create maybe a temp child node for those nodes in order to have the expansion icon.

- handle the onexpanding event, to perform an ajax call in order to retrieve the childs.

- remove the temp child node previously created and replace it with the real childs

Am i in the correct way of doing this, or there is another way ?

Thank you in advance

Regards

Top Replies

Parents
  • 7535
    Offline posted

    Hello Steeve,

    Load on demand functionality enables the tree grid to request the data for the child nodes from the server as the user interacts with the grid (expands a node). This approach significantly reduces the amount of data being transferred between the browser and the server.

     In order to take advantage of the remote load on demand functionality the controller action responsible for processing the requests should be decorated with TreeGridDataSourceAction attribute. As you expand a row, the grid makes an Ajax call to the server.

    You can refer following sample demonstrates how to use the load on demand functionality of igTreeGrid.

    http://www.igniteui.com/tree-grid/remote-features

    http://www.igniteui.com/help/api/2015.2/ui.igtreegrid#options:enableRemoteLoadOnDemand

    Please let me know I may be further assistance.

Reply Children