Reputation: 8921
I'm using the classic WinForms version of the DevExpress XtraEditors. The WPF version makes it easy to get the editor's old value in the EditValueChanged event, but I don't see how to get the old value in the WinForms counterpart EditValueChanged
event. If it can be obtained from within that event, how to do it?
Upvotes: 1
Views: 1957
Reputation: 6621
RepositoryItemGridLookUpEdit
class is not an editor itself. This class is only holding properties for in-place editors. So, to get editor's old value you must get the editor itself (from sender
object) and use its BaseEdit.OldEditValue
property.
Here is example:
private void repositoryItemGridLookUpEdit1_EditValueChanged(object sender, EventArgs e)
{
var baseEdit = (BaseEdit)sender;
if (baseEdit.OldEditValue.ToString() == "Some value")
{
//...
}
}
Upvotes: 1