AJAX Treeview How to keep expanded nodes expanded during AJAX postback

Discussion in 'ASP .Net' started by ton, Nov 13, 2008.

  1. ton

    ton Guest

    Hi,

    In my website the treeview is placed in the update panel of AJAX. Clicking
    on the nodes, the server side code is getting the childnotes and shows the
    details on the right site of the treeview. just like an normal exploere
    would do. After clicking on several nodes, I'll got deeper in the tree and
    after a while, the right site shows the correct information, but the tree is
    collapsed on a arbitrairy node. I can't figure out whats happening.

    Another situation is that an node which was collapsed by the user is again
    expanded, and another node is collapsed.

    Does anyone got an idea. I do not handle clientscript after the click

    How can I maintain the expanded/collapsed state.

    Thanks


    ton
    ton, Nov 13, 2008
    #1
    1. Advertising

  2. ton

    Oceaneer Guest

    RE: AJAX Treeview How to keep expanded nodes expanded during AJAX post

    ShowExpandCollapse needs to be set to true and most likely the
    EnableViewstate needs to be on for the tree and all parent elements.

    Be careful of the tree control. It gets extremely large in a hurry (it is a
    giant table). Just view the source of one of your pages to see what I mean.
    Over a WAN link it can make the web page unusable.

    What I like to do is put a method in my base form that parses a querystring
    parameter (like ?node=sports/golf/tiger) and then use it to re-expand the
    node on each postback.

    "ton" wrote:

    > Hi,
    >
    > In my website the treeview is placed in the update panel of AJAX. Clicking
    > on the nodes, the server side code is getting the childnotes and shows the
    > details on the right site of the treeview. just like an normal exploere
    > would do. After clicking on several nodes, I'll got deeper in the tree and
    > after a while, the right site shows the correct information, but the tree is
    > collapsed on a arbitrairy node. I can't figure out whats happening.
    >
    > Another situation is that an node which was collapsed by the user is again
    > expanded, and another node is collapsed.
    >
    > Does anyone got an idea. I do not handle clientscript after the click
    >
    > How can I maintain the expanded/collapsed state.
    >
    > Thanks
    >
    >
    > ton
    >
    >
    Oceaneer, Dec 9, 2008
    #2
    1. Advertising

  3. ton

    ton Guest

    Re: AJAX Treeview How to keep expanded nodes expanded during AJAX post

    that is the default setting, which is allready set. The problem is not in
    teh beginning. I'm showing a list, and after clicking I read the additional
    content (childnotes) and so on. After a while (5 clicks) somtimes shorter,
    the treeview is collapsed each time I click a different node.

    This will not help.

    My problem looks as if the additional nodes added to the treeview
    "destroyes" the cache or state of the control and the treeview "thinks" that
    other nodes should be expanded.

    Thanx anyhow.
    ton


    "Oceaneer" <> schreef in bericht
    news:D...
    >
    > ShowExpandCollapse needs to be set to true and most likely the
    > EnableViewstate needs to be on for the tree and all parent elements.
    >
    > Be careful of the tree control. It gets extremely large in a hurry (it is
    > a
    > giant table). Just view the source of one of your pages to see what I
    > mean.
    > Over a WAN link it can make the web page unusable.
    >
    > What I like to do is put a method in my base form that parses a
    > querystring
    > parameter (like ?node=sports/golf/tiger) and then use it to re-expand the
    > node on each postback.
    >
    > "ton" wrote:
    >
    >> Hi,
    >>
    >> In my website the treeview is placed in the update panel of AJAX.
    >> Clicking
    >> on the nodes, the server side code is getting the childnotes and shows
    >> the
    >> details on the right site of the treeview. just like an normal exploere
    >> would do. After clicking on several nodes, I'll got deeper in the tree
    >> and
    >> after a while, the right site shows the correct information, but the tree
    >> is
    >> collapsed on a arbitrairy node. I can't figure out whats happening.
    >>
    >> Another situation is that an node which was collapsed by the user is
    >> again
    >> expanded, and another node is collapsed.
    >>
    >> Does anyone got an idea. I do not handle clientscript after the click
    >>
    >> How can I maintain the expanded/collapsed state.
    >>
    >> Thanks
    >>
    >>
    >> ton
    >>
    >>
    ton, Dec 10, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rao
    Replies:
    0
    Views:
    539
  2. TMT32
    Replies:
    0
    Views:
    746
    TMT32
    Jul 12, 2006
  3. qwweeeit
    Replies:
    2
    Views:
    646
    qwweeeit
    Dec 14, 2005
  4. =?Utf-8?B?VmlrcmFt?=

    Treeview current selected node expanded

    =?Utf-8?B?VmlrcmFt?=, Aug 14, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    309
    =?Utf-8?B?VmlrcmFt?=
    Aug 14, 2007
  5. Per Salmi

    TreeView not rendering nodes? Cacheing of a TreeView

    Per Salmi, Oct 15, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    461
    Steve Drake
    Oct 15, 2003
Loading...

Share This Page