Back to Devexpress

DialogEditFormBehavior.ValidateRowDeletion Event

wpf-devexpress-dot-xpf-dot-grid-dot-dialogeditformbehavior-d1bb9b61.md

latest3.0 KB
Original Source

DialogEditFormBehavior.ValidateRowDeletion Event

Occurs after a user removes selected rows from the control. This event allows you to validate rows, check database constraints, and delete rows from the database.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Extensions.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public event EventHandler<EditFormValidateRowDeletionArgs> ValidateRowDeletion
vb
Public Event ValidateRowDeletion As EventHandler(Of EditFormValidateRowDeletionArgs)

Event Data

The ValidateRowDeletion event's data class is EditFormValidateRowDeletionArgs. The following properties provide information specific to this event:

PropertyDescription
KeysGets KeyProperty values for deleted rows.
ValidateAsyncGets or sets the task that validates the delete row operation.

Remarks

After a user removes selected rows from the control, the behavior raises the ValidateRowDeletion event and executes the ValidateRowDeletionCommand.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ValidateRowDeletion event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EntityFramework/InstantFeedbackMode/MainWindow.xaml#L48

xml
CreateEditItemViewModel="OnCreateEditEntityViewModel" ValidateRow="OnValidateRow"
                        ValidateRowDeletion="OnValidateRowDeletion">
<dxg:DialogEditFormBehavior.EditTemplate>

See Also

DialogEditFormBehavior Class

DialogEditFormBehavior Members

DevExpress.Xpf.Grid Namespace