Hi Ranju,
We regret for the inconvenience caused.
On further analysis, we have found that the issue is not a defect. This is the default behaviour of TreeViewAdv only. The following steps illustrates how it is bahaving:
Actually the check box of the TreeNodeAdv has three check states they are:
i) Checked state
ii) Unchecked state
iii) Indeterminate state
1) Check the parent node -> Parent Node will be in Checked State.
2) Uncheck some of child nodes -> Parent Node will be in Indeterminate state.
3) Check the parent node -> Parent Node will be in Checked State.
4) Uncheck the parent node -> Parent Node will be in Unchecked State.
5) Check the parent node -> Parent Node will be in Indeterminate state. When parent is in Indeterminate state, it by default checks only the nodes that are previously selected.
This can be avoided by setting the InteractiveCheckBoxes property to false and in BeforeCheck event assign the Parennode's Check state to child nodes check state. Please refer to the following code snippets:
private void treeViewAdv1_BeforeCheck(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvBeforeCheckEventArgs e)
{
if (e.Node.HasChildren)
{
foreach (TreeNodeAdv node in e.Node.Nodes)
{
node.CheckState = e.NewCheckState;
}
}
}
Please refer to the following sample:
http://websamples.syncfusion.com/samples/Tools.Windows/F75635/main.htmPlease try this and let me know if this helps.
Regards,
Fathima