hi i am using this code to get the checked treeview node name.... it goes inside the loop only if the parent node is selected...
I have to get the node name if any node is checked...
this is the code i am using..
public void CheckedNames(System.Windows.Forms.TreeNodeCollection theNodes)
{
if (theNodes != null)
{
foreach (System.Windows.Forms.TreeNode aNode in theNodes)
{
if (aNode.Checked)
{
aResult.Add(aNode.Text);
}
}
}
}
i am calling it from the AfterCheck event
public void treeView1_AfterCheck(object sender, TreeViewEventArgs e)
{
aResult.Clear();
CheckedNames(treeView1.Nodes);
}
what i am doing wrong... help me
vince