473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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.

May 31 '06 #1
2 3751
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.
May 31 '06 #2
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 ***
Jun 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rasmus | last post by:
I need to grab focus to a specific node i my treeview when I click on my listbox. Here's the code that differs between the different event i the listBox: private void...
3
by: Peter | last post by:
Hello Thanks for reviewing my question. I would like to know how can I programmatically select a node Thanks in Advanc Peter
1
by: Alan Silver | last post by:
Hello, I have a web.sitemap file that is used as the data for a treeview control. This shows the site structure very well, but I would like to add the description (in the siteMapNode element in...
10
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a...
3
by: musosdev | last post by:
Hi guys How do I get the new TreeView (asp2.0) to load something in an Iframe? I've setup a NaviagateUrl and set the Target property to the name of the Iframe, but it still tries to load a new...
6
by: cyriel1920 | last post by:
Hi, I use the selectednodestyle with a white background so the user can see which item was chosen in the treeview navigation. The nodes have a navigateURL with a target to another frame....
7
by: tman | last post by:
I am generating a very large tree list in my program and while it's performance is great once loaded it takes a really long time to load. I create a root TreeNode "offline" and go through the...
2
by: Antonio | last post by:
Hi, I would like to have my TreeNode to call window.close(); without posting back, how can I do that? At the same time, I prefer to have a SelectAction property that allows my TreeNode to appear...
26
by: JJ | last post by:
Is there any way you can expand a parent node on the treeview control _without a postback_ by clicking on the node text (NOT clicking the expand image URL) ? I want to format the treeview node...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.