TcxCustomGridView.RestoreFromStorage(string,TcxCustomReaderClass,Boolean,Boolean,TcxGridStorageOptions,string,string) Method
Restores previously saved grid View state information from a file in a custom data format.
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 | Description |
---|---|---|
AStorageName | string | The source file. The file format depends on the reader class reference passed as the Note The procedure interprets the |
AReaderClass | TcxCustomReaderClass | A reference to the required reader class (a TcxCustomReader class descendant). The specified reader implementation interprets content loaded from the source file or system registry key passed as the |
AChildrenCreating | Boolean | Optional. Specifies if the procedure creates missing grid View elements (columns, bands, series, etc.):
|
AChildrenDeleting | Boolean | Optional. Specifies if the procedure deletes redundant grid View structure elements (columns, bands, series, etc.):
If the current grid View structure matches the loaded state, the |
AOptions | TcxGridStorageOptions | Optional. Specifies a set of individual user interaction states restored from the source file or registry key ( If this parameter is omitted, the procedure loads only the grid View structure information, even if the specified source contains user interaction state information. |
ARestoreViewName | string | Optional. Specifies the source grid View name. Use this parameter if you need to apply a saved state to a different grid View. |
AOwnerName | string | Optional. Specifies the parent form name for the TcxGrid control. Tip This parameter can be useful for MDI application projects. |
Remarks
Call the StoreToStorage procedure to save specified data layout and user interaction states to a file in a custom data format. A subsequent RestoreFromStorage
call restores the saved grid View state from the file.
Dedicated View State Store/Restore Methods
The TcxCustomGridView class also implements the following Store~
/Restore~
method pairs suitable for most scenarios:
- StoreToIniFile | RestoreFromIniFile
- Allow you to store the grid View state (both data layout and user interaction states) in an INI file.
- StoreToRegistry | RestoreFromRegistry
- Allow you to store the grid View state (both data layout and user interaction states) in the system registry.
- StoreToStream | RestoreFromStream
- Allow you to store the grid View state (both data layout and user interaction states) in a stream.
- StoreDataViewState | RestoreDataViewState
- Allow you to store user interaction states in memory during the same session.
- StoreDataViewStateToStream | RestoreDataViewStateFromStream
- Allow you to store only user interaction states in a separate stream.