473,395 Members | 1,692 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,395 software developers and data experts.

<asp:TreeView> ShowExpandCollapse & individual nodes' SelectAction

Hi,

Adding nodes to a TreeView programatically...

1) Instantiate a TreeNode object and set its SelectAction to
TreeNodeSelectAction.Expand.

2) Instantiate another TreeNode object and add it to the first TreeNode's
ChildNodes collection.

3) Add the first TreeNode to a TreeView's Nodes collection.

Now, when the user clicks the first TreeNode, it expands or contracts its
child nodes as expected, just as if the user had clicked the little square
box to the left of the node in question.

However, now your client tells you that he doesn't like the little square
boxes with the plus and minus signs, so you set the TreeView's
ShowExpandCollapse property to false. This, of course, removes the little
boxes but in doing so also removes the ability to expand those nodes with
child nodes - is this "normal" behaviour...?

If so, is the accepted workaround to set ShowExpandCollapse to true and to
set the TreeView's CollapseImageURL and ExpandImageURL to a transparent gif
with a size of 1px x 1px?

Any assistance gratefully received.

Mark
Feb 13 '07 #1
0 2489

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

Similar topics

3
by: rao | last post by:
Hi All, I am generating temporary xml files to bind it to tree view control. A unique xml file is generated for each user. I generating these files Using streamwriter class. Later when I try to...
2
by: Gabriel Lozano-Morán | last post by:
Is there a reason why this does NOT work in IE6.0 ? <html> <head> <style type="text/css"> a { text-decoration: none; } a:hover
4
by: Bounz | last post by:
I want TreeView don't generate onClick='doPostBack' method for all nodes and leaves in my Tree. How can I realize this?
11
by: Jamie Bissett | last post by:
I have an application that creates a pretty intensive TreeView at startup time. I had the program running on a single thread sucessfully, but the startup time was a bit excessive. When the...
1
by: James Coleman | last post by:
I am using the TreeView control in ASP.NET 2.0 and like it. However, our sitebuilders aren't too pleased with the idea of the table that gets rendered. They are big into avoiding <table> tags...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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.