P
pbaugh
Hi Folks,
I've got a treeview control (trvRecipes) and am attempting to detect
the 'checking' of a nodes checkbox in order to check all the child
nodes. Ive found some sample code to do precisely this on MSDN, but
for some reason the event never seems to get raised....
private void trvRecipes_AfterCheck(object sender,
TreeViewEventArgs e)
{
// The code only executes if the user caused the checked
state to change.
if (e.Action != TreeViewAction.Unknown)
{
if (e.Node.Nodes.Count > 0)
{
/* Calls the CheckAllChildNodes method, passing in
the current
Checked value of the TreeNode whose checked state
changed. */
this.CheckAllChildNodes(e.Node, e.Node.Checked);
}
}
}
Im sure its just something obvious Im missing.... any ideas??
Many many thanks
Pete
I've got a treeview control (trvRecipes) and am attempting to detect
the 'checking' of a nodes checkbox in order to check all the child
nodes. Ive found some sample code to do precisely this on MSDN, but
for some reason the event never seems to get raised....
private void trvRecipes_AfterCheck(object sender,
TreeViewEventArgs e)
{
// The code only executes if the user caused the checked
state to change.
if (e.Action != TreeViewAction.Unknown)
{
if (e.Node.Nodes.Count > 0)
{
/* Calls the CheckAllChildNodes method, passing in
the current
Checked value of the TreeNode whose checked state
changed. */
this.CheckAllChildNodes(e.Node, e.Node.Checked);
}
}
}
Im sure its just something obvious Im missing.... any ideas??
Many many thanks
Pete