I have a .Net desktop application with a TreeView as one of the UI elements.
I want to be able to multi-select that TreeView, only that isn’t supported at all.
So I’m adding check-boxes to the tree, My problem is that only some items are selectable, and those that aren’t can’t consistently cascade selections.
Is there any way to disable or hide some check-boxes while displaying others?
The default behavior of TreeView is that when the Checkboxes property is set to true, that checkboxes will be shown for all TreeNodes.
The behavior that you are looking for – to disable or hide some checkboxes – is a custom modification of the normal behavior. You can create a custom implementation of TreeView or TreeNode that overrides the default behavior. One other thing to try would be to use the TreeView.StateImageList property. Some sites to check out for more info: