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

TcxPivotGridField.OnSetStoredPropertyValue Event

Enables you to restore the current field’s property values from external data stores.

Declaration

property OnSetStoredPropertyValue: TcxSetStoredPropertyValueEvent read; write;

Remarks

This event is fired for each property (including default properties) within the list specified in the field’s OnGetStoredProperties event handler. Handle the OnSetStoredPropertyValue event to restore custom property values that were explicitly specified via the OnGetStoredProperties event handler.

The Sender parameter specifies the current field.

The AName parameter identifies the property name. Its value is returned by the AValue parameter. Use this value to assign a corresponding property.

The following code represents an OnSetStoredPropertyValue event handler demonstrating how to restore a field’s DisplayFormat property value previously saved within the field’s OnGetStoredPropertyValue event handler.

procedure <Form>.<Field>SetStoredPropertyValue(Sender: TObject; const AName: String; const AValue: Variant);
begin
  if Sender is TcxPivotGridField then
  begin
    if AName = 'DisplayFormat' then
    begin
      TcxPivotGridField(Sender).DisplayFormat := AValue;
      Exit;
    end;
  end;
end;

Note

To properly initialize fields that are created during the restoring process, handle the pivot grid’s OnInitStoredObject event.

See Also