TcxCustomGridView.RestoreFromStorage(string,TcxCustomReaderClass,Boolean,Boolean,TcxGridStorageOptions,string,string) Method
Restores View-specific information from a custom storage.
Declaration
procedure RestoreFromStorage(const AStorageName: string; AReaderClass: TcxCustomReaderClass; AChildrenCreating: Boolean = True; AChildrenDeleting: Boolean = False; AOptions: TcxGridStorageOptions = [gsoUseFilter, gsoUseSummary]; const ARestoreViewName: string = ''; const AOwnerName: string = '');
Parameters
Name | Type |
---|---|
AStorageName | string |
AReaderClass | TcxCustomReaderClass |
AChildrenCreating | Boolean |
AChildrenDeleting | Boolean |
AOptions | TcxGridStorageOptions |
ARestoreViewName | string |
AOwnerName | string |
Remarks
This method is similar to the RestoreFromIniFile, RestoreFromRegistry, and RestoreFromStream methods that allow you to restore View-specific information from an INI file, registry, or stream. Unlike these methods, you can use the AReaderClass parameter to specify the class name of a TcxCustomReader descendant, which reads data from custom storage (for instance, an XML file). Examples of a TcxCustomReader descendant include TcxIniFileReader, TcxRegistryReader, and TcxStreamReader that are used by the above-mentioned methods. Refer to the descriptions of these methods to learn about other method parameters.
To customize the list of the View’s properties restored from a custom storage, 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 RestoreFromStorage method is called with True passed for the AChildrenCreating parameter) by re-associating its events with existing event handlers and assigning its properties.