API:SimpleDS.TSimpleDataSet.MasterSource

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property MasterSource: TDataSource read GetDataSource write SetDataSource;

C++

__property MasterSource;

Properties

Type Visibility Source Unit Parent
property published
SimpleDS.pas
SimpleDS.hpp
SimpleDS TSimpleDataSet

Description

Specifies a data source component for the master dataset when establishing a detail-master relationship between this dataset and another one.

SimpleDS.TSimpleDataSet.MasterSource inherits from Datasnap.DBClient.TCustomClientDataSet.MasterSource. All content below this line refers to Datasnap.DBClient.TCustomClientDataSet.MasterSource.

Specifies a data source component for the master dataset when establishing a detail-master relationship between this dataset and another one.

Use MasterSource to specify the name of the data source component whose DataSet property identifies a dataset to use as a master table in establishing a detail-master relationship between this dataset and another one.

At design time, choose an available data source from the MasterSource property's drop-down list in the Object Inspector.

After setting the MasterSource property, specify which fields to use in the master table by setting the MasterFields property. At run time, each time the current record in the master table changes, the new values in those fields are used to select corresponding records in this dataset for display.

Note: At design time, use the Field Link designer to establish the master-detail relationship between two datasets.

Tip: MasterSource establishes a master/detail relationship using the traditional linked cursor approach. Alternately, client datasets can participate in master/detail relationships using nested datasets, where the detail dataset is stored with the master table's data. To assign a client dataset's data as the value of a nested detail, use the DataSetField property.

See Also