GridControlBase.InvalidRowException Event

Fires when a row fails validation or when it cannot be saved to a data source.

Namespace: DevExpress.UI.Xaml.Grid

Assembly: DevExpress.UI.Xaml.Grid.v19.2.dll


public event InvalidRowExceptionEventHandler InvalidRowException
Public Event InvalidRowException As InvalidRowExceptionEventHandler

Event Data

The InvalidRowException event handler receives an argument of the InvalidRowExceptionEventArgs type. The following properties provide information specific to this event.

Property Description
ErrorText Gets or sets the error description.
Exception Gets the exception that raised the GridControlBase.InvalidRowException event.
ExceptionMode Gets or sets a value that specifies how an exception should be handled.
Row Gets the processed row.
(Inherited from RowEventArgs)
RowHandle Gets the processed row's handle.
(Inherited from RowEventArgs)
Source Gets the grid that raised the event.
(Inherited from RowEventArgs)
WindowCaption Gets or sets the error window's caption.


Row validation is performed within the GridControl.ValidateRow event handler, when a row is about to lose focus. The InvalidRowException event allows you to override the default error presentation. This event occurs after the GridControl.ValidateRow event (provided that the focused row's validation has failed).

Use the event parameter's InvalidRowExceptionEventArgs.ExceptionMode property to specify the action performed in response to entering an invalid value. You can display a message box with an error description, suppress any action, throw an exception or discard new data and revert to an old value.

See Also