TreeView and not being able to do things progammatically

Discussion in 'ASP .Net Web Controls' started by Luis Ferrao, Mar 18, 2005.

  1. Luis Ferrao

    Luis Ferrao Guest

    Hi,

    I've been working with a treeview for quite a while now.
    Yersterday I decided to add some icons using the treenodetype property.

    I created three treenodetypes programmatically in the code behind and
    added them to the treenodetypes of the tree, no problem.

    I added a small "childtype = sometype" to the treeview directly in the
    asp code, and all my treenodes displayed the correct icons, again, no
    problem.

    Then I removed the "childtype" thing from the asp code and added a
    programmatically defined type to each node, since each of them is
    created and added to the tree programmatically.

    Basically I just added a <newNode.Type = "sometype";> somewhere among
    the lines:
    TreeNode newNode = new TreeNode();
    newNode.Text = "some text";
    myRootNode.Add(newNode);

    The problem is, the nodes are still created perfectly with their text
    value perfectly set, but no type whatsoever is defined or outputed, and
    no errors are thrown either.

    Why in the name of all that is holy is ASP.NET ignoring my code? What
    have I done?

    This is very annoying. Thanks for any help.

    Luis

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Luis Ferrao, Mar 18, 2005
    #1
    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. Russ Perry Jr
    Replies:
    1
    Views:
    467
    Russ Perry Jr
    Jul 30, 2004
  2. Philippe C. Martin
    Replies:
    1
    Views:
    263
    Thomas Guettler
    Dec 7, 2004
  3. =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=

    vs2005 publish website doing bad things, bad things

    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, Oct 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    598
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Oct 25, 2006
  4. Khaja Moin

    Not able to get the Onclick Event in TreeVIew Control

    Khaja Moin, Jun 27, 2003, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    169
  5. sed_y
    Replies:
    0
    Views:
    1,013
    sed_y
    Feb 15, 2012
Loading...

Share This Page