This is a migrated thread and some comments may be shown as answers.

How to Raise the OnNodeEdit Event from Code Behind?

1 Answer 35 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 20 Feb 2013, 02:16 PM
Hello,

I have this situation, when the user creates a new node, a new node is added with a random name, the problem is that I only save the new node in the OnNodeEdit Event so if the user doesn't change the name of the newly created node and leaves the random name unchanged the OnNodeEdit event is not executed, is there a way to raise the OnNodeEdit event from code behind?

Thank you.

1 Answer, 1 is accepted

Sort by
0
MasterChiefMasterChef
Top achievements
Rank 2
answered on 20 Feb 2013, 03:36 PM
Hi Eric,

I'm guessing you're using the 'NodeCreated' event to initialize the node's name. Even if the user doesn't change the name, couldn't you just save the node inside the NodeCreated event as opposed to during the NodeEdit event? This may make more sense because not every user will immediately change the default title of the node.

Hopefully this helps,
Master Chief
Tags
TreeView
Asked by
Eric
Top achievements
Rank 1
Answers by
MasterChiefMasterChef
Top achievements
Rank 2
Share this question
or