Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Tree View for Non-Navigational Purposes

Reply
Thread Tools

Tree View for Non-Navigational Purposes

 
 
=?Utf-8?B?ZGF2ZS5kb2xhbg==?=
Guest
Posts: n/a
 
      03-19-2006
I have generated a nice tree view that displays some otherwise cyptic XML in
an easy to follow manner. The trouble is that the TreeView assumes that I'm
wanting a link in each of the nodes, and I really just want to display them
for view only. How can I disable the link-ness of the data in the tree view?
I have tried setting the target of the links to "javascript:false;" but it
still causes a postback and flashes the page to the top destroying my scroll
position.

Am I missing something?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
Guest
Posts: n/a
 
      03-20-2006
Set the NavigateUrl property of the TreeNode to an empty string:

"The text of a node in the TreeView control can be in one of two modes:
selection mode or navigation mode. By default, a node is in selection mode.
To put a node into navigation mode, set the node's NavigateUrl property to a
value other than an empty string (""). To put a node into selection mode, set
the node's NavigateUrl property to an empty string.
http://msdn2.microsoft.com/en-us/lib...de(VS.80).aspx

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com


"dave.dolan" wrote:

> I have generated a nice tree view that displays some otherwise cyptic XML in
> an easy to follow manner. The trouble is that the TreeView assumes that I'm
> wanting a link in each of the nodes, and I really just want to display them
> for view only. How can I disable the link-ness of the data in the tree view?
> I have tried setting the target of the links to "javascript:false;" but it
> still causes a postback and flashes the page to the top destroying my scroll
> position.
>
> Am I missing something?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?ZGF2ZS5kb2xhbg==?=
Guest
Posts: n/a
 
      03-20-2006
haha, thanks. I always go making things difficult. (I had started to look for
more elaborate things like overriding the render method) figures it something
simple.

"Phillip Williams" wrote:

> Set the NavigateUrl property of the TreeNode to an empty string:
>
> "The text of a node in the TreeView control can be in one of two modes:
> selection mode or navigation mode. By default, a node is in selection mode.
> To put a node into navigation mode, set the node's NavigateUrl property to a
> value other than an empty string (""). To put a node into selection mode, set
> the node's NavigateUrl property to an empty string."
> http://msdn2.microsoft.com/en-us/lib...de(VS.80).aspx
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "dave.dolan" wrote:
>
> > I have generated a nice tree view that displays some otherwise cyptic XML in
> > an easy to follow manner. The trouble is that the TreeView assumes that I'm
> > wanting a link in each of the nodes, and I really just want to display them
> > for view only. How can I disable the link-ness of the data in the tree view?
> > I have tried setting the target of the links to "javascript:false;" but it
> > still causes a postback and flashes the page to the top destroying my scroll
> > position.
> >
> > Am I missing something?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
abt tree view in asp.net can i hide the tree nodes ? raki ASP .Net 1 06-24-2009 11:45 AM
PBR for load sharing purposes paranic Cisco 2 11-02-2005 02:37 PM
How to make a week view and day view calendar just like month view calendar in .NET ? Parthiv Joshi ASP .Net Web Controls 1 07-06-2004 03:15 PM
Validators at cross purposes? Ken McAndrew ASP .Net 2 01-06-2004 05:13 PM
B tree, B+ tree and B* tree Stub C Programming 3 11-12-2003 01:51 PM



Advertisments