Skip to main content

TcxCustomGridView.StoreToRegistry(string,Boolean,TcxGridStorageOptions,string,string) Method

Stores View-specific information to the registry.

Declaration

procedure StoreToRegistry(const AStorageName: string; AReCreate: Boolean = True; AOptions: TcxGridStorageOptions = []; const ASaveViewName: string = ''; const AOwnerName: string = '');

Parameters

Name Type
AStorageName string
AReCreate Boolean
AOptions TcxGridStorageOptions
ASaveViewName string
AOwnerName string

Remarks

Use the StoreToRegistry method to save View-specific information to the registry. This information can be restored after the changes have been applied to a View. Use the RestoreFromRegistry method to restore the View structure. Before restoring the View structure, ensure that the View is connected to a data set containing the same fields assigned to the View items as were saved in a registry key.

View structure information includes:

  • View class and instance names;

  • View element settings. These settings include only those settings that can be adjusted by end-users: the position, size, and visibility within a View, sort order, etc.

The registry path for the View information is formed by adding the AStorageName suffix to the HKEY_CURRENT_USER key.

The AReCreate parameter determines whether the required key is recreated via each call of the StoreToRegistry method. If this parameter value is True, then the existing registry key is deleted and then created again. Otherwise, information is appended to the existing key.

For information on the AOptions and ASaveViewName parameters, see the description of the RestoreFromIniFile method.

To customize the list of the View’s properties which are saved to the registry, handle the OnGetStoredProperties and OnGetStoredPropertyValue events.

See Also