Reload Items

3 posts, 0 answers
  1. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 18 Apr 2011 Link to this post

    I am building a treeview control which has X number of root nodes (from a database), each of which contain two static nodes which themselves contain Y number of dynamic nodes. Something like this:

    • Root Node #1 (database-driven)
      • Child Node #1 (static)
        • Sub Node #1 (database)
        • Sub Node #2
      • Child Node #2 (static)
        • Sub Node #3 (database)
    • Root Node #2
      • Child Node #3 (static)
        • Sub Node #4 (database)

    I have implemented loading on demand for items at the "Child Node" level so it would automatically pull the sub-items when that node is expanded (using ServerSideCallBack) which works great. I have also implemented a context menu for each "Child Node" entry that has an "Add Category" option which adds a new item (at the Sub Node level) so a new entry can be added. This entire process works great and is surprisingly versatile.

    The only issue I have is when the new item is added I want all the "Sub Node" entries for the parent "Child Node" item to be re-bound so the items appear in alphabetical order. I tried using the set_expanded() methods but it seems once a node has been expanded the items are cached and there isn't a way to forcefully tell it to go get the items again. Basically I'm looking for a client-side method call that tells the "Child Node" entry that it needs to go get a fresh copy of items once the adding process is complete.

    Any idea on how to make this happen?

  2. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 20 Apr 2011 Link to this post

    Anyone?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006
Back to Top