Xceed Grid for WinForms v4.3 Documentation
ValidationError Event (CellRow)


Xceed.Grid.v4.3 Assembly > Xceed.Grid Namespace > CellRow Class : ValidationError Event
Raised by the Xceed.Grid.Collections.DataRowList.AddNew or EndEdit methods when the values of one of the cells in the DataRow does not pass the validation process.
Syntax
'Declaration
 
<DescriptionAttribute("Raised by the DataRowList.AddNew or EndEdit methods when the values of one of the cells in the DataRow does not pass the validation process.")>
<CategoryAttribute("Data")>
Public Event ValidationError As RowValidationErrorEventHandler
'Usage
 
Dim instance As CellRow
Dim handler As RowValidationErrorEventHandler
 
AddHandler instance.ValidationError, handler
[Description("Raised by the DataRowList.AddNew or EndEdit methods when the values of one of the cells in the DataRow does not pass the validation process.")]
[Category("Data")]
public event RowValidationErrorEventHandler ValidationError
Event Data

The event handler receives an argument of type RowValidationErrorEventArgs containing data related to this event. The following RowValidationErrorEventArgs properties provide information specific to this event.

PropertyDescription
Gets or sets a boolean value indicating if the row whould exit edit mode.  
Gets the exception that was thrown.  
Remarks

Setting e.CancelEdit to false in the ValidationError event will prevent the row from leaving edit mode in the case where the values of one of its cells fails the validation process.

Custom validation can be provided in the EndingEdit event. In this event, if the validation process fails, setting e.Cancel to true will cause the ValidationError event to be raised.

The row's ValidationError event will be raised if e.Cancel is set to true in the EndingEdit event and/or if an exception is thrown in the EndingEdit event.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also