Load on demand from client side without calling expand()

3 posts, 1 answers
  1. Wendelstam
    Wendelstam avatar
    48 posts
    Member since:
    Feb 2006

    Posted 07 Mar 2013 Link to this post

    I have a TreeView that loads child nodes through a webservice call when I expand by clicking or by calling .expand() on the node object in javascript.
    I need to load (atleast sometimes) large number of child nodes and I would like to be able to quickly server the UI a list of parent nodes that are then by filled with childnodes through the webservice from JS on the client side.

    So for example in the $.ready() event start loading childnodes for my tree without expanding them.

    The reason is that i have a filter box that searches the treeview structure and therefore I need all the nodes but I dont want to take the performance hit at the first rendering.

    Is it possible to call a method like (psuedo) .load_from_webservice() on the Node client objects?
  2. Answer
    Bozhidar
    Admin
    Bozhidar avatar
    1102 posts

    Posted 11 Mar 2013 Link to this post

    Hi Jonah,

    This scenario is achievable, but it requires some custom javascript code. I've attached a small sample page demonstrating how this could be done. 
     

    All the best,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Wendelstam
    Wendelstam avatar
    48 posts
    Member since:
    Feb 2006

    Posted 11 Mar 2013 Link to this post

    Thanks, it works great!
Back to Top