MX-Frame Library Send comments on this topic.
DataSources
See Also
MX-Developer > User Interface - MxPart > Controls > Control Properties > Data > DataSources

Glossary Item Box

Defines the data source and its fields used to present the data in the control.

Remarks

Property specifies the data sources, fields and their configuration which will be used to present the hierarchy in which the data will be presented to the end user.

Several different types of data sources can be used

Data Source Description
Static  Reserved for future use.
Recursive  Data source is used to define the hierarchy of data when the data is organized in master – detail relationship in the same data source. Using the properties it is possible to determine the field whose value will be displayed and fields for creating the relationship.
Dynamic  Reserved for future use.

Each data source has several properties which are used to define data and master – detail relationship.

Property Description
Adapter  Defines the adapter which will provide the data source.
DataSourceName  Defines the data source whose fields will be displayed and used for creating mater – detail relationship.
DisplayMemeber  The field from the data source whose value will be displayed for each record.
Key  The key field whose value will be recognized as the detail value.
ParentKey  The key field whose value will be recognized as the master value.

Example

In order for the hierarchy to be built successfully, data source must contain appropriate data. It must have data organized so that it contains master – detail relationship.

To create data source

  1. In Solution Explorer open MxPart component which contains control (Tree) for displaying data in master – detail relationship.
  2. Select the desired control (Tree) on the canvas.
  3. Open Property Window.
  4. In section Data edit DataSources property.
  5. Right click the Data Source node in Component Browser section.
  6. Select the desired data source type.
  7. Select the newly created data source and configure its properties in section Selected Element Properties.

See Also

MxPart
Tree

©2009 Metronik. All Rights Reserved.