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

[Solved] How to check if row value is changed

1 Answer 259 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hans Notelteirs
Top achievements
Rank 1
Hans Notelteirs asked on 24 Sep 2009, 09:17 AM
Hi,

I am trying to find out a way to check if my row has changed. 
Normally on the RowValidating event args you have a property "OldData" which gives you the old data the row is based on.
But when I check this property it is already updated with the new data, so I can't used this to check if the row has changed.
Maybe the old data is updated already because I use TwoWay binding, but when I don't use TwoWay binding, the grid values aren't updated.

Now I'm using a workaround with the CellEditEnded event and compare the NewData and OldData property, but I don't think this is the way. Can somebody tell me which is the way to go? 

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 24 Sep 2009, 03:18 PM
Hi Hans Notelteirs,

Indeed this is a known issue, you can use OldValues property of the GridViewRowEditEndedEventArgs which is a Dictionary<string, object> where string is GridViewDataColumn.DataMemberBinding.Path and object is the actual value. This property is available with the latest internal binaries.

Hope this helps.

All the best,
Nedyalko Nikolov
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.
Tags
GridView
Asked by
Hans Notelteirs
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or