Skip to main content

TcxCustomTreeList.OnGetStoredPropertyValue Event

Enables you to provide values for tree list properties to be saved to external data stores.

Declaration

property OnGetStoredPropertyValue: TcxGetStoredPropertyValueEvent read; write;

Remarks

This event is fired for each property within the list specified in the OnGetStoredProperties event handler. To restore tree list properties, handle the OnSetStoredPropertyValue event.

The Sender parameter specifies the TreeList control 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 tree list’s OptionsView.Footer and OptionsView.GroupFooters properties previously specified for storage within the tree list’s OnGetStoredProperties event handler.

procedure TMyForm.cxTreeList1GetStoredPropertyValue(Sender: TObject; const AName: String; var AValue: Variant);
begin
  if Sender is TcxCustomTreeList then
  begin
    if AName = 'OptionsView_Footer' then
    begin
      AValue := TcxCustomTreeList(Sender).OptionsView.Footer;
      Exit;
    end;
    if AName = 'OptionsView_GroupFooters' then
    begin
      AValue := TcxCustomTreeList(Sender).OptionsView.GroupFooters;
      Exit;
    end;
  end;
end;
See Also