Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Setting ShowCheckBox on a single node when ShowCheckBoxes for a TreeView is "Leaf"

Reply
Thread Tools

Setting ShowCheckBox on a single node when ShowCheckBoxes for a TreeView is "Leaf"

 
 
scartin@gmail.com
Guest
Posts: n/a
 
      02-13-2007
I'm currently using a TreeView to represent a tree of selections
available to a user. Some may already be populated, and these should
not be editable (i.e. the user can not clear the selection). Since
this functionality seems to be lacking with the basic TreeView
control, and third-party utilities aren't an option at this time, I
opted to simply use the ShowCheckBox method on the TreeNode I wished
to make read-only, and then use the ImageURL attribute to put an image
in place of the checkbox to indicate the read-only status.

However, it seems this is messing about with what the TreeView
considers to be a "leaf" node. If I do this for one single node and
set TreeNode.ShowCheckBox = false, the parent node will now have a
Checkbox next to the text. This occurs whether there are or are not
additional children of that parent that still contain selectable
checkboxes.

I don't understand why this would react that way... these parent nodes
still have children, therefore they are not "leaf" nodes. In almost
all cases, they still have checkboxes as well, so it shouldn't be that
it's making its determination on how many children with checkboxes
exist. Has anyone seen this behavior before, and is there anything I
can do to control it?

Thanks for your assistance,
Simon

 
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
TreeView node style - for an individual node Homer J. Simpson ASP .Net 5 07-24-2007 10:04 PM
How to find node in TreeView by using string(the same as Node.Text) ? jiing ASP .Net 0 04-27-2007 02:34 AM
xsl variable $node/text() but $node can non-node-set help! Tjerk Wolterink XML 2 08-24-2006 03:28 AM
How to set the node indent property between the parent node and the leaf node viveknatani@gmail.com ASP .Net 0 02-13-2006 07:11 PM
How to drag a sub-node to another node in TreeView? wolf ASP .Net 0 08-18-2004 11:51 PM



Advertisments