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.SaveKeys Method

In This Article

Saves the record identifiers of the expanded master rows, grouping rows and selected rows.

#Declaration

Delphi
procedure SaveKeys;

#Remarks

Use the SaveKeys method to save the record identifiers of the master rows, grouping rows and selected rows. Unlike record handles and record indexes, record identifiers are not changed when the number and order of records within a dataset changes (see the TcxCustomDataSource class description for information on record indexes and record handles).

The record identifiers are generated via the GetRecordId method which accepts record handles as its parameter.

Call the SaveKeys method before making changes to a dataset (for instance, before deleting a record). This will keep the expansion and selection state within the data controller when changing the order of records within the associated dataset. Call the RestoreKeys method to restore the record state, saved via the SaveKeys method.

See Also