Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
programmatically check/uncheck tree nodes.
posted

Hi,

A Tree's nodes are: NodeStyle = NodeStyle.CheckBox;

When user checks a node, i programmatically check its child nodes, and programmatically set its parent to CheckState.Indeterminate;

tried listening to the below events: 

<treeView_BeforeCheck(object sender, BeforeCheckEventArgs e)> and <treeView_BeforeCheck(object sender, AfterCheckEventArgs e)>

On both events, as i programmatically check o uncheck the boxes, the event is being raised again.

Is there a way to hold the event from firing, if the edit of check box is done programmatically?

else, is there a better practise on doing this?

 

thanks for suggestions,

R.