We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

TreeNodeAdv cancel text edit

How can I cancel a node that is currently in edit mode when the user clicks somewhere other than the node? I tried using the LeaveFocus event but it does not work if the user clicks on say a menu bar.

7 Replies

VS Vijayanand S Syncfusion Team April 21, 2006 05:55 AM UTC

Hi Rich, TreeViewAdv control edit mode will automatically end when anyother controls take focus from the label editor text box. When you click on the menu or empty space on the form, the label editor text box will not lose the focus. Thats why you cannot cancel the edit mode of the node. However, you could manually cancel the edit mode by calling the EndEdit() method while selecting the menu bar. Please take a look at the sample which illustrates the above mentioned functionality and let me know if you have any questions. Thanks for your interest in Syncfusion Products. Regards, Vijay Project1.zip


AD Administrator Syncfusion Team April 21, 2006 05:48 PM UTC

The problem with that solution is that the menubar has to know about the tree. Is there no other way to accomplish this?


DT Deepa TS Syncfusion Team April 24, 2006 02:03 PM UTC

Hi Rich, Sorry for the inconvenience caused. I am afraid ,currently we do not have any workaround for this.And I have opened a feature request. Feature Request #912 -Add support for cancelling the edit mode of node when the user clicks somewhere other than node We will try our very best to address the same at the earliest with high priority. Thanks for your patience. Thanks & Regards, Deepa.


AD Administrator Syncfusion Team March 12, 2007 02:56 PM UTC




Hi,

it seems that we currently run into the same problem with 4.3.0.30 and VB.Net2.0

Is there any solution that solves the problem?

It is almost a year since the feature request#912 was opened with high priority but it is still open?


greetings, Klaus


MU Murugan Syncfusion Team March 15, 2007 02:55 PM UTC

Hi Klaus,

We are really sorry for the delay in responding. We have increased the priority of the feature request. We try our best to implement the feature at the earliest. As a workaround please use the below code snippet

Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)

If Me.treeViewAdv1.SelectedNode.IsEditing Then
Me.treeViewAdv1.CancelEditMode()

End If

End Sub

Please try this and let me know if it helps you.

Thanks for your patience.

Regards,
Murugan P.S


AD Administrator Syncfusion Team March 16, 2007 10:21 AM UTC

Hi!

We tried your workaround, but it doesn't work for our problem because all events we tried came too late. So the "IsEditing"-property was already false.
However, we solved it by using a message hook on mouse events and calling the CancelEditMode.

greetings, Klaus


GR Golda Rebecal Syncfusion Team April 3, 2007 07:43 AM UTC

Hi Klaus,

Sorry for the delay in responding.

Could you please create a Direct-Trac incident with the subject line "TreeNodeAdv cancel text edit - F43339" so that we can give more details regarding the fix?

Thanks for your interest in Syncfusion products.

Best Regards,
Golda

Loader.
Live Chat Icon For mobile
Up arrow icon