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

# TDBRadioGroup.GetButtonValue

Gets the value for the radio button at the specified position in the control.

## Declaration

Source position: dbctrls.pp line 589

`protected function TDBRadioGroup.GetButtonValue(`
`Index: Integer`
`):string;`

## Arguments

`Index` |  | Ordinal position in Items for the requested radio button.

## Function result

The value stored for the specified radio button.

## Description

GetButtonValue is a String function used to get the value for the Radio Button at the ordinal position specified in Index.

When Index is a negative non-zero value, the return value is an empty string (''). Otherwise, the return value contains the content at the specified index position in Values. If no corresponding entry is available in Values, the content from Items at the specified position is used.

Use the Items property to define the Radio Buttons displayed in the control. Use Values to define the content stored in DataField when the radio button in ItemIndex is selected.

GetButtonValue is used in the implementation of the UpdateRadioButtonStates method.

## See also

TDBRadioGroup.Items |  | Contains the string values used as captions for radio buttons in the grouped data-aware control.
TDBRadioGroup.ItemIndex |  | Ordinal position for the selected radio button in the group.
TDBRadioGroup.Values |  | The values of the strings in Items.
TDBRadioGroup.Value |  | The value for the selected radio button in the control.
TDBRadioGroup.UpdateRadioButtonStates |  | Updates the linked dataset to reflect the current radio button selected in the control.