Skip to main content

TcxTreeListBand.OnSetStoredPropertyValue Event

Enables you to restore the current band’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 band’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 band.

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

procedure <Form>.<Band>SetStoredPropertyValue(Sender: TObject; const AName: String; const AValue: Variant);
begin
  if Sender is TcxTreeListBand then
  begin
    if AName = 'Expandable' then
    begin
      TcxTreeListBand(Sender).Expandable := AValue;
      Exit;
    end;
  end;
end;
See Also