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

Discussion in 'ASP .Net Web Controls' started by scartin@gmail.com, Feb 13, 2007.

  1. Guest

    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
     
    , Feb 13, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,470
  2. Alexandre Jaquet

    [JTree] Adding a leaf to a node

    Alexandre Jaquet, Nov 8, 2003, in forum: Java
    Replies:
    0
    Views:
    616
    Alexandre Jaquet
    Nov 8, 2003
  3. mazdotnet
    Replies:
    1
    Views:
    7,636
    mazdotnet
    Aug 1, 2006
  4. William Main

    Fixed bug in IE Treeview Webcontrol when clicking on leaf node.

    William Main, Feb 1, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    272
    William Main
    Feb 1, 2005
  5. Bret

    Force postback from Treeview leaf node

    Bret, Jun 15, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    376
Loading...

Share This Page