Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TreeView > TreeView Edited event NewValue and OldValue

Not answered TreeView Edited event NewValue and OldValue

Feed from this thread
  • Lauren Nickerson avatar

    Posted on Dec 23, 2009 (permalink)

    Hi, so I'm in this event I need the old value to do some evaluation, but instead, I get the NewValue on both objects:

    private void treeViewExperimentExplorer_Edited(object sender, RadTreeViewItemEditedEventArgs e) 
        string newName = e.NewValue.ToString(); 
        string oldName = e.OldValue.ToString(); 

    In there both newName and oldName have the new value. How can I get the previous value in there?

    Thanks!

    Reply

  • Miroslav Miroslav admin's avatar

    Posted on Dec 28, 2009 (permalink)

    Hi Lauren Nickerson,

    Unfortunately when the TreeView uses an ItemEditTemplate (i.e. it is bound) it will not populate these properties. They contain just the data item that the TreeView is bound to.

    We are looking to enable these properties for the Q1 release of the controls when the TreeView is bound.

    In the meantime I can suggest storing the value that you need in a field when editing starts and then refering to it if you need to when editing ends.

    Regards,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

    Reply

  • Lauren Nickerson avatar

    Posted on Dec 28, 2009 (permalink)

    That was plan B. Thanks!

    Reply

  • Menny avatar

    Posted on Jan 29, 2012 (permalink)

    its 2012 now and this still happens

    Reply

  • Kiril Stanoev Kiril Stanoev avatar

    Posted on Feb 1, 2012 (permalink)

    Hello Menny,

    The previously mentioned behavior is by design. Our suggestion is to use the PreviewEdited and Edited events to distinguish between the new and old values. Please take a look at the attached project for further reference.

    Greetings,
    Kiril Stanoev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

  • Menny avatar

    Posted on Feb 5, 2012 (permalink)

    yeh, figured it out

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TreeView > TreeView Edited event NewValue and OldValue
Related resources for "TreeView Edited event NewValue and OldValue"

WPF TreeView Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]