I have the following code for the user to be able to check/uncheck all child nodes when a node is checked through the NodeClick event:
Private Sub SelNodesPropagation(ByVal nd As TreeNodeAdvCollection, bCheck As Boolean)
Dim nodX As TreeNodeAdv
If (nd Is Nothing) Then Exit Sub
For Each nodX In nd
nodX.Checked = bCheck
SelNodesPropagation(nodX.Nodes, bCheck)
Next
End Sub
When a node is clicked, sometimes it works well, sometimes it does not.
Please see what happens in
Could you please help?
Thx
private void TreeViewAdv1_NodeMouseClick(object sender, TreeViewAdvMouseClickEventArgs e)
{
SelNodesPropagation(e.Node.Nodes, e.Node.Checked);
} |
private void TreeViewAdv1_NodeMouseClick(object sender, TreeViewAdvMouseClickEventArgse)
{
SelNodesPropagation(e.Node.Nodes, e.Node.Checked);
} |
I've found that the only way to make it work properly was by replacing the NodeMouseClick event by the AfterCheck event.
Thx for your help anyway...