DataGridView.ValidateAndSave Event
Allows you to validate data item values before they are committed to the data source.
Namespace: DevExpress.Maui.DataGrid
Assembly: DevExpress.Maui.DataGrid.dll
NuGet Package: DevExpress.Maui.DataGrid
Declaration
public event EventHandler<ValidateItemEventArgs> ValidateAndSave
Event Data
The ValidateAndSave event's data class is ValidateItemEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
AutoUpdateItemsSource | Gets or sets whether the control should update the source of items when editing is finished. |
Context | Gets the context object. |
DataChangeType | Gets the operation type. |
IsValid | Gets or sets whether the new value is valid. |
Item | Gets the control’s item whose value is changed. |
SourceIndex | Gets the index (in the data source) of the item that is changed. |
The event data class exposes the following methods:
Method | Description |
---|---|
ForceUpdateItemsSource() | Forces the update of items source. |
Remarks
The DataGridView runs validation mechanisms after a user taps the Save button in the edit form in a built-in detail form or after you call the DetailEditFormViewModel.Save() method for a custom form.
See Also