现在 点了子级 父级能取消 但是 父级的父级却没有取消勾选 我希望 点了最子级 这个最子级的每个父级都取消勾选。不知道要如何实现
Dim trv1 As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim trv2 As WinForm.TreeView = e.Form.Controls("TreeView2")
Dim nd1 As WinForm.TreeNode = trv1.SelectedNode
Dim dr As DataRow
If e.node.ParentNode IsNot Nothing Then '取消父节点的选中标记,因为选中子节点,就不要选中父节点了
e.node.ParentNode.Checked = False
End If
For Each cnd As WinForm.TreeNode In e.Node.allNodes '取消子节点的选中标记,因为选中父节点,就不要选中子节点了
cnd.Checked = False