FMX.Controls.Model.TDataModel.Data
Delphi
property Data[const Key: string]: TValue read GetData write SetData;
C++
__property System::Rtti::TValue Data[const System::UnicodeString Key] = {read=GetData, write=SetData};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FMX.Controls.Model.pas FMX.Controls.Model.hpp |
FMX.Controls.Model | TDataModel |
Description
Value of the data model for the specified Key
. Use it for sending any kind of data to presentation layer without creating custom model class.
Key
is a string key providing access to data Values in a presentation or in the TDataModel.DataSource collection.
When TDataModel changes the TDataModel.Data value, the data model automatically sends notification messages with the MM_DATA_CHANGED
ID to a presentation wrapping data in the TDataRecord format. If the specified value is nil
, the model tries to remove this key-value pair from DataSource.
When TDataModel requests a value, TDataModel automatically sends a request with the MM_GETDATA
ID to a presentation wrapping data in the TDataRecord format.
If a presentation returns an empty nil
value, the model tries to get value from the DataSource.