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

ValueValidating and EndEdit

1 Answer 63 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Arun Kumar
Top achievements
Rank 1
Arun Kumar asked on 19 Nov 2008, 06:47 PM
I have a derived RadTreeNode. And in the ValueValidating event of Rad treeview, I am moving my derived RadTreeNode, based on the text entered, if validation was successful.

But moving the RadTreeNode causes a Null reference exception in RadTreeView.EndEdit(bool). I am not sure when the EndEdit gets called internally to the RadTreeview, but I guess it doesnt like the Treenode being moved in ValueValidating when it was successful.( I dont get the exception when i dont move the node).

Previously, I was able to do the same with TreeView in AfterLableEdit, with out any problem, I was moving the tree node in AfterLableEdit event. but when I change my code to RadTreeView ValueValidating and Edited events, I couldnt move the nodes in ValueValidating event.

Any help is highly appreciated.

thanks
Arun

1 Answer, 1 is accepted

Sort by
0
Jordan
Telerik team
answered on 21 Nov 2008, 04:33 PM
Hello Arun Kumar,

EndEdit gets called mainly when the user ends editing a node or when selection changes. The Edited event is fired just after the AfterLabelEdit event so you should not have any problems doing your work in its event handler.

It will be most helpful if you can send us a sample project that demonstrates the issue so that we can examine your exact scenario locally and identify the reason for the exception.

Thank you in advance.

 
Regards,
Jordan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Treeview
Asked by
Arun Kumar
Top achievements
Rank 1
Answers by
Jordan
Telerik team
Share this question
or