GridControl.ValidateCell Event
In This Article
Enables you to specify whether the focused cell’s data is valid, and whether the cell’s editor can be closed.
Namespace: DevExpress.WinUI.Grid
Assembly: DevExpress.WinUI.Grid.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
public event EventHandler<GridCellValidationEventArgs> ValidateCell
#Event Data
The ValidateCell event's data class is GridCellValidationEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cell |
Gets the cell’s old valid value. |
Column | Gets the column that contains the processed cell. |
Error |
Gets or sets an object that describes the validation error.
Inherited from Validation |
Error |
Gets or sets the error icon type.
Inherited from Validation |
Is |
Gets or sets a value which specifies whether the value is valid.
Inherited from Validation |
Row |
Gets the processed row.
Inherited from Grid |
Row |
Gets the processed row’s handle.
Inherited from Grid |
Update |
Gets the action that caused the validation.
Inherited from Validation |
Value |
Gets the editor’s value.
Inherited from Validation |
The event data class exposes the following methods:
Method | Description |
---|---|
Set |
Marks the processed input value as invalid and displays an error within the editor with the specified error icon type.
Inherited from Validation |
Set |
Marks the processed input value as invalid and displays an error within the editor.
Inherited from Validation |
#Remarks
The ValidateCell event occurs before the focused cell’s modified value is posted to a data source, allowing to manually validate its new value.
The focused cell’s new value is returned by the event’s CellValue property.
See Also