Displaying and Editing Fields in an Edit Box

From RAD Studio
Jump to: navigation, search

Go Up to Displaying a Single Record

Vcl.DBCtrls.TDBEdit is a data-aware version of an edit box component. TDBEdit displays the current value of a data field to which it is linked and permits it to be edited using standard edit box techniques.

For example, suppose CustomersSource is a TDataSource component that is active and linked to an open TClientDataSet called CustomersTable. You can then place a TDBEdit component on a form and set its properties as follows:

  • DataSource: CustomersSource
  • DataField: CustNo

The data-aware edit box component immediately displays the value of the current row of the CustNo column of the CustomersTable dataset, both at design time and at run time.

See Also