Skip to main content

TcxCustomGridView.StoreToStream(TStream,TcxGridStorageOptions,string,string) Method

Saves the View-specific information to a stream.

Declaration

procedure StoreToStream(AStream: TStream; AOptions: TcxGridStorageOptions = []; const ASaveViewName: string = ''; const AOwnerName: string = '');

Parameters

Name Type
AStream TStream
AOptions TcxGridStorageOptions
ASaveViewName string
AOwnerName string

Remarks

Use the StoreToStream method to save View-specific information to a stream. This information can be restored after changes have been applied to a View. Use the RestoreFromStream 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 as were assigned to the View items when saved to the stream.

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 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 a stream, handle the OnGetStoredProperties and OnGetStoredPropertyValue events.

See Also