[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'db' (#fcl)

TDataSet.OnNewRecord

Event triggered when a new record is created.

Declaration

Source position: db.pas line 1381

public property TDataSet.OnNewRecord: TDataSetNotifyEvent
  read FOnNewRecord
  write FOnNewRecord;

Description

OnNewRecord is triggered by the TDataset.Append or TDataset.Insert methods when the buffer for the new record's data has been allocated. This event can be used to set default value for some of the fields in the dataset. If an exception is raised during this event handler, the operation is cancelled and the dataset is put again in browse mode (TDataset.State is again dsBrowse).

See also

TDataset.Append

  

Append a new record to the data

TDataset.Insert

  

Insert a new record at the current position.

TDataset.State

  

Current operational state of the dataset

The latest version of this document can be found at lazarus-ccr.sourceforge.net.