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

TcxCustomPivotGrid.OnGetStoredProperties Event

Enables you to customize a list of the pivot grid’s properties to be stored to external data stores.

Declaration

property OnGetStoredProperties: TcxGetStoredPropertiesEvent read; write;

Remarks

Whenever the storing process is started by the StoreToIniFile, StoreToRegistry, or StoreToStream method call, a list of the properties to store is produced. When the OnGetStoredProperties event is fired, the list is already populated with pivot grid property names, which are stored by default. These property names are specified by the PivotGridDefaultStoredProperties global constant. You can add custom property names to the list and handle the OnGetStoredPropertyValue and OnSetStoredPropertyValue events to provide property values to be saved to and restored from a data store. Make certain that items in the list uniquely identify the property names they correspond to.

The Sender parameter specifies the pivot grid whose properties are to be stored.

The AProperties parameter provides access to the list of properties to be stored.

The following code represents an OnGetStoredProperties event handler, demonstrating how to extend the list with items that correspond to the pivot grid’s OptionsView.ColumnGrandTotals and OptionsView.RowGrandTotals properties.

procedure <Form>.<PivotGrid>GetStoredProperties(Sender: TObject; AProperties: TStrings);
begin
  AProperties.Add('OptionsView_ColumnGrandTotals');
  AProperties.Add('OptionsView_RowGrandTotals');
end;

Note

To customize the manner in which field properties are persisted, handle a field’s OnGetStoredProperties, OnGetStoredPropertyValue, and OnSetStoredPropertyValue events.

See Also