Is there a standard for updating Perspective Tree components with data in the database?
I'm working on a Perspective tree that allows the user to track and update an organizational tree stored in the database. The UI lets the user add items to the tree by sending INSERT queries to the database, then once the update is complete, the binding on the Tree's data is refreshed. The binding fires a sproc that makes the database assign the items
property on the tree with the most recent version of the tree's data in the database, including the changes made by the user.
However, this system is flawed because the records cannot track whether the records in the tree should be expanded or not. This means that any time the binding refreshes, the tree collapses or expands regardless of the state the user had it in.
Is there a way to update my tree that preserves the expanded
state of each node set by the user in the current session?