ValueValidating and EndEdit

2 posts, 0 answers
  1. Arun Kumar
    Arun Kumar avatar
    3 posts
    Member since:
    Dec 2007

    Posted 19 Nov 2008 Link to this post

    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.

  2. Jordan
    Jordan avatar
    547 posts

    Posted 21 Nov 2008 Link to this post

    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.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
Back to Top