Skip to main content

TcxCustomPivotGrid.OnGetStoredPropertyValue Event

Enables you to provide values for pivot grid properties to be saved to external data stores.

Declaration

property OnGetStoredPropertyValue: TcxGetStoredPropertyValueEvent read; write;

Remarks

This event is fired for each property (including default properties) within the list specified in the OnGetStoredProperties event handler. To restore pivot grid properties, handle the OnSetStoredPropertyValue event.

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

The AName parameter identifies the property name.

Pass the property value as the AValue parameter.

The following code represents an OnGetStoredPropertyValue event handler demonstrating how to save the values of the pivot grid’s OptionsView.ColumnGrandTotals and OptionsView.RowGrandTotals properties previously specified for storage within the pivot grid’s OnGetStoredProperties event handler.

procedure <Form>.<PivotGrid>GetStoredPropertyValue(Sender: TObject; const AName: String; var AValue: Variant);
begin
  if Sender is TcxCustomPivotGrid then
  begin
    if AName = 'OptionsView_ColumnGrandTotals' then
    begin
      AValue := TcxCustomPivotGrid(Sender).OptionsView.ColumnGrandTotals;
      Exit;
    end;
    if AName = 'OptionsView_RowGrandTotals' then
    begin
      AValue := TcxCustomPivotGrid(Sender).OptionsView.RowGrandTotals;
      Exit;
    end;
  end;
end;
See Also