Skip to main content

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

Restores View-specific information from the registry.

Declaration

procedure RestoreFromRegistry(const AStorageName: string; AChildrenCreating: Boolean = True; AChildrenDeleting: Boolean = False; AOptions: TcxGridStorageOptions = [gsoUseFilter, gsoUseSummary]; const ARestoreViewName: string = ''; const AOwnerName: string = '');

Parameters

Name Type
AStorageName string
AChildrenCreating Boolean
AChildrenDeleting Boolean
AOptions TcxGridStorageOptions
ARestoreViewName string
AOwnerName string

Remarks

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

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.

For the information on the other parameters, see the description of the RestoreFromIniFile method.

To customize the list of the View’s properties which are restored from the registry, handle the OnSetStoredPropertyValue event.

Note

You can handle the OnInitStoredObject event to properly initialize the object which corresponds to the re-created View element (provided that the RestoreFromRegistry method is called with True passed for the AChildrenCreating parameter) by re-associating its events with existing event handlers and assigning its properties.

See Also