Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomDataController.InsertRecord(Integer) Method

Inserts a new empty record in the current data controller.

#Declaration

Delphi
function InsertRecord(ARecordIndex: Integer): Integer; virtual;

#Parameters

Name Type
ARecordIndex Integer

#Returns

Type
Integer

#Remarks

Use the InsertRecord method to insert a new empty record in the current data controller in unbound and provider modes. In bound mode, when the data controller (TcxDBDataController) provides dataset records, you should use the Insert method instead.

A new record is inserted at the position specified by the ARecordIndex parameter. InsertRecord returns the record index of the inserted record. The record index can be used to access field values of the record via the Values property.

In provider mode, you need to implement the AppendRecord and InsertRecord methods of your custom data source to allow record insertions. The AppendRecord method of your custom data source is automatically called when you insert a record in an empty data controller.

See Also