preloaded node in webservice mode

2 posts, 0 answers
  1. Dave
    Dave avatar
    21 posts
    Member since:
    Jul 2012

    Posted 10 Sep 2013 Link to this post

    For my application, I need to have the root node and it's children all populated on initial load.   Descendants are to be loaded using webservice mode.   This is all working fine, i.e. the initial load displays all the children of the root, and when expanded the children load via the webservice.

    The issue I'm having is with the root node.   If after the initial load, the root is collapsed and then expanded, the webservice is still called and a second set of children are added to the root.  It seems the root, from a load-on-demand perspective, doesn't know that its children are loaded.

    How can the second load be avoided?

    Dave


  2. Dave
    Dave avatar
    21 posts
    Member since:
    Jul 2012

    Posted 10 Sep 2013 Link to this post

    I found a solution.  While building the tree within the codebehind, I set the root node's ExpandMode to ClientSide, while leaving its children at Webservice mode.  When the page renders, the root node and its children are all visible.  I am able to collapse and expand the root node, without getting a second load of the children, and the descendant nodes populate on demand using the webservice.  I'm happy, but if there is a better way, or this way presents some hidden danger, then please advise.

    Thanks!
    Dave
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top