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

E

Elton Pruitt

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.
 
T

tanya foster

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.
 
A

akjoshi

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,717
Messages
2,569,382
Members
44,704
Latest member
FawnBernay

Latest Threads

Top