Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
Is there an event for "Record Deleted"?
posted

Dear Infragistics,

In my XamDataGrid, I am using the event "RecordAdded" for new records. This works great. However, I am trying to find the equivalent event for when a record is deleted.

I see that there is a "RecordsDeleted" event, but I am needing an event that fires when a record is deleted that tells me which record was removed (so I can remove it from a corresponding List collection in my code).

So - how can I tell which record was deleted?

Any advice is greatly appreciated!

Thanks

  • 69686
    Verified Answer
    posted

    Hello,

    RecordsDeleted event is fired after the records are deleted. That is why you cannot find any way to get those records. However, RecordsDeleting event is fired when you are actually deleting it. It is a cancellable event, so you can cancel it if you want by e.Cancel = true. In this even, you can get the records that are going to be deleted from the event args - e.Records.

    Hope this helps.