Skip to main content

TcxCustomDataSource.AppendRecord Method

Appends a new record to the current custom data source.

Declaration

function AppendRecord: TcxDataRecordHandle; virtual;

Returns

Type
TcxDataRecordHandle

Remarks

This function is called when a user:

  • Appends a new record within a custom data source, for instance, by using the data controller’s Append method. In a grid control, the method is called when the user presses the down arrow key when focus is on the last record and the view’s OptionsData.Appending property is set to True.

  • Inserts a new record into an empty data source. A record can be inserted by using the data controller’s InsertRecord method. In a grid control, a user can insert a record by pressing the INSERT key within a grid view.

You should implement AppendRecord to add a new record at the end of your custom data source. You must also return the handle of the new record, which will be further used as the record’s unique identifier. See the TcxCustomDataSource class description for information on record handles.

When implementing the AppendRecord function, you should call the DataChanged method to notify the data controller of data changes.

See Also