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

TcxTreeListBand.OnGetStoredProperties Event

Enables you to customize a list of the current band’s properties to be stored to external data stores.

Declaration

property OnGetStoredProperties: TcxGetStoredPropertiesEvent read; write;

Remarks

Whenever the storing process is started by the StoreToIniFile, StoreToRegistry, or StoreToStream method call, a list of the properties to store is produced. When the OnGetStoredProperties event is fired, the list is already populated with band property names, which are stored by default. These property names are specified by the BandPropertiesName global constant. You can add custom property names to the list and handle the band’s OnGetStoredPropertyValue and OnSetStoredPropertyValue events to provide property values to be saved to and restored from a data store. Make certain that items in the list uniquely identify the property names they correspond to.

The Sender parameter specifies the current band.

The AProperties parameter provides access to the list of properties to be stored.

The following code represents an OnGetStoredProperties event handler, demonstrating how to extend the list with an item that corresponds to a band’s Expandable property.

procedure <Form>.<Band>GetStoredProperties(Sender: TObject; AProperties: TStrings);
begin
  AProperties.Add('Expandable');
end;

Note

To customize the manner in which tree list properties are persisted, handle the tree list’s OnGetStoredProperties, OnGetStoredPropertyValue, and OnSetStoredPropertyValue events. To customize the manner in which column properties are persisted, handle a column’s OnGetStoredProperties, OnGetStoredPropertyValue, and OnSetStoredPropertyValue events.

See Also