TreeviewAdv with dockingmanager gives label editing problem

Hi!

I get an unwanted behaviour when I use a docking manager on a windows form and enable docking to a TreeViewAdv. The problem is as follows:

If I start editing the label of a node, the only way to end the editing seems to be to press Enter key or Esc key. I can not get a node out of label edit mode by a mouse click somewhere else in the tree which is possible when a treeviewadv is hosted on a windows form without a docking manager.

This misbehaviour (feature?) can be reproduced by adding a docking manager to the "TreeViewAdv LoadOnDemand Demo" and enable docking to the tree.

Best Regards,
Oskar

3 Replies

OS Oskar February 21, 2007 01:39 PM UTC

I should have mentioned that I'm using Syncfusion Essential Suite 4.4.0.51.


MU Murugan Syncfusion Team February 21, 2007 07:21 PM UTC

Hi Oskar,

We could reproduce the misbehavior here. But this could be solved by handling MouseDown event of the TreeViewAdv control.

Here is the code snippet:

private void treeViewAdv1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
Syncfusion.Windows.Forms.Tools.TreeNodeAdv tvaNode;

tvaNode = this.treeViewAdv1.GetNodeAtPoint( e.X , e.Y );

if ( tvaNode == null )
{
this.treeViewAdv1.EndEdit();
}
else
{
if ( this.treeViewAdv1.SelectedNode != tvaNode )
{
this.treeViewAdv1.EndEdit();
}
}

}

Herewith I have attached the sample. Please refer to the sample and let me know if it helps you.

56820_TDM_TreeViewLabelEditIssue

Thank you for using Syncfusion products.

Regards,
Murugan P.S


AD Administrator Syncfusion Team February 22, 2007 07:29 AM UTC

Thanks for the quick response.

The suggested solution works as expected.

Regards,
Oskar

Loader.
Up arrow icon