DVXP TEdit.NET 3.0

TableEditor.BeforeRowUpdate Event

Fired just before a row change (add, edit, delete) is applied to the database. The column values in the Row can be validated or massaged in this event. Note that when a new row is added, BeforeRowUpdate is fired twice. First it is called before the row is added to the Table; the row's RowState property is Detached. At this time, any fields that do not allow null values can be given default values After the row is added to the table, but before the changes are applied to the database, BeforeRowUpdate is called once more with a RowState of Added. At this time, validation can be done on the row (you can throw an exception if invalid data is entered by the user).

[Visual Basic]
Public Event BeforeRowUpdate As BeforeRowUpdateEventHandler
[C#]
public event BeforeRowUpdateEventHandler BeforeRowUpdate;

Event Data

The event handler receives an argument of type BeforeRowUpdateEventArgs containing data related to this event. The following BeforeRowUpdateEventArgs property provides information specific to this event.

PropertyDescription
Row The row that is about to be updated, added or deleted. Check the RowState property of the row to retrieve the type of updated. When validating, throw an exception if the row does not meet the validation criteria.

See Also

TableEditor Class | DVXP.DXTableEditor Namespace