Hi there,
I have a treeview (using an unordered list and JQuerys treeview) in my MVC app and i am wondering the best way to keep the nodes open and close state persisted on postback?
Hi there,
I have a treeview (using an unordered list and JQuerys treeview) in my MVC app and i am wondering the best way to keep the nodes open and close state persisted on postback?
Throw the list into a cookie would be my best idea (then pull it out if it is there, otherwise show the default tree). http://www.quirksmode.org/js/cookies.html
You could also send it to the database and retrieve it, but that might be a little slower...
//edit: This might help:
http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/