dotnet / dotnet/dotnet-api-docs
DataGridView.UserDeletedRow event has no DataBoundItem
Open
area-WinForms
Pri3
untriaged
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
When the UserDeletingRow event (which can be cancelled) is raised, the Row has a DataBoundItem.
When the UserDeletedRow event (which cannot be cancelled) is raised, the Row has an Index of -1 (reasonable), but the DataBoundItem is already null.
There is no property in the event that acts as a substitute.
This means that the only way to get a reference to a successfully deleted item (say to use it in DeleteObject in EF6) is to handle both events.
Contributor guide
Assessment
This issue has not been assessed yet.