vendredi 17 avril 2015

how do i restrict not to select parent node in WinForm TreeView

In winform I want to restrict only select child nodes not to select only parent node.


I tried like following checked parent click and show message box.



TreeNode node = treeView.SelectedNode;
while (node.Parent != null)
{
node = node.Parent;
}

A
+-B
+-C



Is there any other way to do so?



I want user able to select B , C but When He select A i want to show popup like please select child node


Aucun commentaire:

Enregistrer un commentaire