Skip to content

TDataSet.BeforeDelete

Event triggered before a Delete operation.

Declaration

Source position: db.pas line 2145

public property BeforeDelete: TDataSetNotifyEvent;

Description

BeforeDelete is triggered at the start of the TDataset.Delete operation, when the dataset is still in dsBrowse state. The event handler can be used to abort the delete operation: if an exception is raised during the event handler, then the delete operation stops. The event is followed by a TDataset.BeforeScroll event. If the dataset was in insert mode when the Delete method was called, then the event will not be called, as TDataset.Cancel is called instead.

See also

Name Description
TDataset.AfterDelete Event triggered after a successful Delete operation.
TDataset.Delete Delete the current record.
TDataset.BeforeScroll Event triggered before the cursor changes position.
TDataset.Cancel Cancel the current editing operation.
TDataset.State Current operational state of the dataset.