[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'DBCtrls' (#lcl)

TDBLookup.UpdateData

Signals the OnUpdateData event handler for pending changes to the linked dataset.

Declaration

Source position: dbctrls.pp line 157

public procedure TDBLookup.UpdateData(

  ValueIndex: Integer

);

Arguments

ValueIndex

  

Ordinal position in the key fields located in the method.

Description

UpdateData is a procedure used to post pending updates from a data-aware control to the specified key field in the linked dataset. ValueIndex contains the ordinal position in the list of key fields for the value updated in the method. No actions are performed in the method when ValueIndex is not a valid position for the list of key fields.

UpdateData uses the value in ScrollListDataset to determine whether the lookup dataset is moved to the new key value. When ScrollListDataset contains True, the linked lookup dataset calls its Locate method to find the record with the key value in its index fields. The lookup dataset is not moved when ScrollListDataset contains False.

The internal TFieldDataLink is used to access the linked dataset where the value for the control is stored. It has not been assigned, is not Active, or already contains the new key value, no additional actions are performed in the method. Otherwise, the new key value is stored in the field for the index key field.

See also

TDBLookup.KeyField

  

The name of the KeyField used in the lookup search.

TDBLookup.ScrollListDataset

  

Indicates if the Dataset in ListSource can be scrolled when loading/locating key and display values.

TDataLink.DataSet

TDataLink.Active


Version 3.2 Generated 2024-02-25 Home