Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Tue Jan 22, 2008 5:13 am Post subject: HOWTO : Disable multi-state checkboxes in FolderView.Net Control |
|
|
By default, FolderView displays multi-state checkboxes for nodes having 4 states - checked/unchecked/self and child checked/child checked.
This behavior can be overridden and only bi-state checkboxes (checked/unchecked) can be shown by using the following code in the QueryNodeCheckState event.
[C#]
if (e.Node.CheckState == NodeCheckStates.ChildChecked )
e.Node.CheckState = NodeCheckStates.UnChecked;
if (e.Node.CheckState == NodeCheckStates.SelfAndChildChecked)
e.Node.CheckState = NodeCheckStates.Checked;
[VB.Net]
If (e.Node.CheckState = NodeCheckStates.ChildChecked) Then
e.Node.CheckState = NodeCheckStates.UnChecked
End If
If (e.Node.CheckState = NodeCheckStates.SelfAndChildChecked) Then
e.Node.CheckState = NodeCheckStates.Checked
End If |
|