Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASP.NET 2.0 TreeView control quirks
Message
From
19/07/2006 14:58:39
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
ASP.NET 2.0 TreeView control quirks
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01137785
Message ID:
01137785
Views:
70
I am using the NET 2.0 TreeView again for a web app.

By default every node is automatically a hyperlink going to:
TreeView1_SelectedNodeChanged(object sender, EventArgs e)
when clicked.

I need multiple choices so I added a checkbox
TreeView1.Nodes[i].ShowCheckBox == true
programmatically so the user can select several nodes and press [Submit].

Yet every node is a hyperlink and I can't find a way to turn that off. While in development I added a simple return and a label message saying not to click and to check the box instead.

Obviously a round trip and this message won't do in production.

Reading ASP.NET help: "TreeView Web Server Control Overview " I see:

"Node text is the actual text that displays on the TreeNode object. Node text can behave like a hyperlink in navigation mode, or like a button in selection mode."

This seems hopeful. How do you change from nav mode to selection mode? Am I missing something obvious here as I don't see it.

Anhy pointers appreciated.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Next
Reply
Map
View

Click here to load this message in the networking platform