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

# TDBCheckBox.UpdateData

UpdateData - examines the State to see whether it has changed.

## Declaration

Source position: dbctrls.pp line 677

`protected procedure TDBCheckBox.UpdateData(`
`Sender: TObject`
`);`

## Arguments

`Sender` |  | Object for the event notification.

## Description

UpdateData is a procedure used to update the linked dataset for the control when the value in the State property has been changed.

When State contains cbGrayed, the Field in the linked dataset is cleared. For other values, the Field data type determines whether one of the values in Checked, ValueChecked, or ValueUnchecked is used. If the Field is a Boolean data type, the value in Checked is stored to the linked dataset. Otherwise, the text for the field is updated using the value from ValueChecked (when Checked is True) or ValueUnchecked (when Checked is False).

UpdateData is used as the OnUpdateData event handler in the internal TFieldDataLink instance for the class.

## See also

TDBCheckBox.State |  | The check, unchecked, or grayed state for the control.
TDBCheckBox.Checked |  | Indicates the checked state for the control as a Boolean value.
TDBCheckBox.DataField |  | The name (as a string) of the field with which the check box is to be associated.
TDBCheckBox.DataSource |  | Provides access to the dataset with content for the control.
TFieldDataLink.Field |  | The Field to which the datalink is attached.
TFieldDataLink.FieldName |  | FieldName - the name of the attached field, stored as a string.
TFieldDataLink.OnUpdateData |  | OnUpdateData - event handler for updating any pending changes in the data.
TDataLink.DataSource