RAD Studio
ContentsIndex
PreviousUpNext
Declaring the Access Properties for a Data-aware Control

Every data-aware control has a DataSource property that specifies which data source class in the application provides the data to the control. In addition, a control that accesses a single field needs a DataField property to specify that field in the data source. 

Unlike the access properties for the owned classes in the example in Creating a graphic control these access properties do not provide access to the owned classes themselves, but rather to corresponding properties in the owned class. That is, you will create properties that enable the control and its data link to share the same data source and field. 

Declare the DataSource and DataField properties and their implementation methods, then write the methods as "pass-through" methods to the corresponding properties of the data link class.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!