Skip to main content
A newer version of this page is available. .

TcxCustomGridView.RestoreFromStream(TStream,Boolean,Boolean,TcxGridStorageOptions,string,string) Method

Restores View-specific information from a stream.

Declaration

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

Parameters

Name Type
AStream TStream
AChildrenCreating Boolean
AChildrenDeleting Boolean
AOptions TcxGridStorageOptions
ARestoreViewName string
AOwnerName string

Remarks

Use the RestoreFromStream method to restore View-specific information from a stream. 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 stream (by using the StoreToStream 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 AStream parameter identifies an instance of the TStream class or its descendant where the View information is stored.

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 a stream, 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 RestoreFromStream 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