Unfortunately, this causes the nodes (parent nodes) to not open and close consistently. Look at you sample and try to open close the nodes using the mouse buttons.
>Hi Rich,
>
>Thanks for the update.
>
>Please try with the following code to avoid selection when you right click on the TreeViewAdv:
>
> private void treeViewAdv1_MouseDown(object sender, MouseEventArgs e)
> {
>
> this.treeViewAdv1.BeginUpdate();
> if(this.treeViewAdv1.RMouseDownNode!=null)
> if (e.Button == MouseButtons.Right && this.treeViewAdv1.RMouseDownNode.TextBounds.Contains(this.treeViewAdv1.LastMousePositionToClient()))
> {
> this.treeViewAdv1.SelectedNode = this.treeViewAdv1.RMouseDownNode;
> }
> }
>
> private void treeViewAdv1_MouseUp(object sender, MouseEventArgs e)
> {
> this.treeViewAdv1.EndUpdate(true);
> }
>
>
>Please take a look at the attached modified sample which illustrates the above functionality and let me know if this resolves your requirement.
>
>Thanks,
>Vijay
>
>
Modified Sample