ASP.NET 2.0 TreeView - node text as plain text (not hyperlink)

Discussion in 'ASP .Net' started by Elton Pruitt, May 31, 2006.

  1. Elton Pruitt

    Elton Pruitt Guest

    The documentation on the ASP.NET 2.0 TreeView control, located at

    http://msdn2.microsoft.com/en-us/k5c13faz(VS.80).aspx

    says that "Node text ... can be displayed as either plain text or
    hyperlinks." Has anyone found a way to actually display the node text
    as plain text? I need to do that but can't figure out how, nor can I
    find any documentation other than this one snippet to even indicate
    that it is possible.
     
    Elton Pruitt, May 31, 2006
    #1
    1. Advertising

  2. Elton Pruitt

    tanya foster Guest

    Hello,
    there is some sample code at http://www.dotnetnewsgroup.com/message/575219.
    aspx where based on the treeview.selectednode, you change the text of a
    treenode already existing in a treeview in the line of code NodeOfInterest.
    ChildNodes(k).Text = NewDescription


    When populating a treeview, you can set the text field of the treenodes in
    the treeview via something like

    Dim newNode As New TreeNode
    newNode.Value = "this field is hidden from view"
    newNode.Text = "this field user can see in a treeview"
    treeview.nodes.Add(newNode)

    hope this helps.
     
    tanya foster, May 31, 2006
    #2
    1. Advertising

  3. Elton Pruitt

    akjoshi Guest

    hi,

    set selectaction property of node to none to achieve this...

    NewNode.SelectAction = TreeNodeSelectAction.None;

    hope thats what you wanted to do...


    Cheerio...

    Abhishek Joshi

    *** Sent via Developersdex http://www.developersdex.com ***
     
    akjoshi, Jun 12, 2006
    #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. wolf
    Replies:
    0
    Views:
    578
  2. Replies:
    0
    Views:
    1,669
  3. =?Utf-8?B?VHltYm93?=
    Replies:
    2
    Views:
    24,658
    =?Utf-8?B?VHltYm93?=
    Jan 10, 2006
  4. Tjerk Wolterink
    Replies:
    2
    Views:
    1,520
    Dimitre Novatchev
    Aug 24, 2006
  5. jiing
    Replies:
    0
    Views:
    2,426
    jiing
    Apr 27, 2007
Loading...

Share This Page