- Root Node #1 (database-driven)
- Child Node #1 (static)
- Sub Node #1 (database)
- Sub Node #2
- Child Node #2 (static)
- Sub Node #3 (database)
- Child Node #1 (static)
- Root Node #2
- Child Node #3 (static)
- Sub Node #4 (database)
- Child Node #3 (static)
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?