Tree Node Problem

Discussion in 'ASP .Net' started by JJ297, Aug 17, 2007.

  1. JJ297

    JJ297 Guest

    When I click on the Root it appears to double all of the nodes. Is
    there something in properities to turn this off?

    Thanks!
     
    JJ297, Aug 17, 2007
    #1
    1. Advertising

  2. JJ297

    Masudur Guest

    On Aug 17, 10:09 pm, JJ297 <> wrote:
    > When I click on the Root it appears to double all of the nodes. Is
    > there something in properities to turn this off?
    >
    > Thanks!


    Hi..

    Are you filling the tree on tree note selecte event...?
    please be a little more descriptive

    Masudur
     
    Masudur, Aug 18, 2007
    #2
    1. Advertising

  3. Most likely you are populating your treenodes in Page_Load and you are not
    checking whether the page is posting back.
    Page_Load fires every time the page loads (even on postbacks).
    The solution to this is - in Page_Load check to see if the page has posted
    back and if it is posting back then don't populate the treelist (because it's
    already been populated)

    so (assuming you were using data binding)
    Page_Load(....)
    {
    if (IsPostBack==false)
    {
    TreeView.DataBind();
    // or
    PopulateTreeView();
    }
    }

    in vb.net it would be
    if IsPostback=false then
    ....
    end if

    Hope this helps.

    "JJ297" wrote:

    > When I click on the Root it appears to double all of the nodes. Is
    > there something in properities to turn this off?
    >
    > Thanks!
    >
    >
     
    =?Utf-8?B?TmF0aGFuaWVsIEdyZWVuZQ==?=, Aug 20, 2007
    #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. Replies:
    0
    Views:
    1,648
  2. Stub

    B tree, B+ tree and B* tree

    Stub, Nov 12, 2003, in forum: C Programming
    Replies:
    3
    Views:
    10,235
  3. Tjerk Wolterink
    Replies:
    2
    Views:
    1,505
    Dimitre Novatchev
    Aug 24, 2006
  4. Peter Mueller
    Replies:
    6
    Views:
    4,703
    Stefan Ram
    Jan 13, 2008
  5. John Bankhead

    Null parent node on custom tree node after populate on demand

    John Bankhead, Dec 4, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    301
    John Bankhead
    Dec 4, 2006
Loading...

Share This Page