Skip to main content

TcxTreeListColumn.OnSetStoredPropertyValue Event

Enables you to restore the current column’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 column’s OnGetStoredProperties event handler. Handle the OnSetStoredPropertyValue event to restore custom property values that were explicitly specified via the OnGetStoredPropertyValue event handler.

The Sender parameter specifies the current column.

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 column’s Options.Footer property value previously saved within the column’s OnGetStoredPropertyValue event handler.

procedure TMyForm.cxTreeList1SetStoredPropertyValue(Sender: TObject; const AName: String; const AValue: Variant);
begin
  if Sender is TcxTreeListColumn then
  begin
    if AName = 'Options_Footer' then
    begin
      TcxTreeListColumn(Sender).Options.Footer := AValue;
      Exit;
    end;
  end;
end;

Note

To properly initialize columns that are created during the restoring process, handle the tree list’s OnInitStoredObject event.

See Also