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

Can not undo changes after cancel edit

1 Answer 229 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pit Pet
Top achievements
Rank 1
Pit Pet asked on 23 Feb 2011, 12:07 PM
Hi,

after invoke command from button:
           <telerik:RadButton  Content="Cancel"         
          Command="telerik:RadGridViewCommands.CancelRowEdit"
          CommandTarget="{Binding ElementName=nameOfRGV}" />

edit mode is canceled but values in cells are not undoing...
I use ActionAfterLostFocus="None" attribute on my gridview and in RowEditEnded event dictiorany OldValues is empty...
How can i force gridview to load old data?

I use List<MyClass> as ItemsSource for gargridview instead of ObservableCollection<MyClass>. Can it cause the problem?

I think that my source list is updated after each cell editing. I thought that source will be updated after commitedit event...

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 01 Mar 2011, 11:01 AM
Hello Pit Pet,

Generally your business object (MyClass) should implement INotifyPropertyChanged interface in order RadGridView to reflect all values change. You could perform a simple test after CancelRowEdit command, sort RadGridView (old values should be populated). If old values are populated you could achieve this without sort with INotifyPropertyChanged interface.

Could you provide me with a little bit more information how do you perform edit (via TAB, Enter or mouse click outside the row)? 

Best wishes,
Nedyalko Nikolov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Pit Pet
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or