Treeview

I would like to build a asp page to display some data in a treeview which can expand on demand without posting everytime. Thats the easy part! The problem is when I need to refresh the page to get more data or view changes in the "titles". If i expand some nodes and then refresh the page then i need to expand them once again to view the changes. Does anyone have a clever script to accomplish this?
LVL 1
haas090897Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xabiCommented:
Ok, I have my own, and I use this technique. I have two frames, The left one with the tree view, and the right one with the contens of the selectd tree item. When I expand anything in the left window i pass the value to a right page variable, so I always have a track of the expanded left window nodes. When I reload the left page i ask the right page for the expanded nodes and expand them.
I hope it helps you.
My script is made ussing ASP to retrieve database values, Javascript for the logic and DHTML for hidind showing nodes.
Xabi
0
haas090897Author Commented:
I guess thats the way to do it. It feels like I have tried everything else. I think i need to keep track of the nodes they close to, but i have an idea to accomplish this to.
0
xabiCommented:
My tree branches have an unique name, so when I open one, I add it to a Variables, in this way:

Opened = "000000@000001"

Each leaf name separated with an "@". When I close one leaf I remove it form the Opened string.
To open the leafs you only need to split the Opened string with

to_open = Opened.split("@")
for (i in to_open) {
  open_function(to_open[i])
}

Hope it helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
COBOLdinosaurCommented:
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to xabi

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
0
Computer101Commented:
Comment from expert accepted as asnwer.

Computer101
E-E Moderator
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.