X4 Produktdokumentation

RadioButtonGroup

With <RadioButtonGroup> controls, you can create a group of radio buttons that are contained in a single cell. Users can select from several predefined options, where only one option can be active at a time. They are particularly suitable for decisions where the choices are mutually exclusive, such as the choice of a payment method or a priority level.

Instructions for use

A <RadioButtonGroup> control is created with the <RadioButtonGroup> element. The element can only be used in the layout of a Detail Component or a Form Component.

<RadioButtonGroup>
...
</RadioButtonGroup>

The <RadioButtonGroup> element can contain the following element:

  • <RadioButtonOption>

<RadioButtonGroup> controls can be used in all available layout types: For more information, see Layouts.

Attribute

Note:

There are a number of default attributes that can be set for all controls. For more information about the default attributes, see Default attributes.

In addition to the default attributes, you can define the following attribute for <RadioButtonGroup> controls.:

Attribute

Description

value

Required

Technical value to be further processed.

  • Data binding (string or boolean) possible

Possible values:

Any string

<RadioButtonOption> element

Child element of <RadioButtonGroup> . Defines the individual options for the radio button group.

You can define the following attributes for the <RadioButtonOption> element:

Attribute

Description

value

Required

Technical value to be further processed.

  • Data binding (string or boolean) possible

Possible values:

Any string

displayName

Label of the radio button.

  • Translatable

  • Data binding possible

Possible values:

Any string

Actions

The following action is available for <RadioButtonGroup> controls. For more information about actions, see Actions.

<SelectAction>

You can insert the Select action using the <SelectAction/> element within <RadioButtonGroup>. The action is triggered when the user selects the radio button.

Note:

You must insert the <SelectAction> element before the desired layout type (BoxLayout, FlowLayout, GridLayout, ResponsiveLayout, TabLayout).

The Select action is created with the <SelectAction/> element within <RadioButtonGroup> and is triggered when the radio button is selected.

Example

RadioButton control in the Detail Component
XML
<DetailComponent>
    <FlowLayout>
        <Label value="Select your preferred appointment type" fontWeight="Bold"/>
        <RadioButtonGroup value="#appointment" horizontalAlign="left">
            <RadioButtonOption value="#appointment" displayName="On-site"/>
            <RadioButtonOption value="#appointment" displayName="Phone"/>
            <RadioButtonOption value="#appointment" displayName="Video call"/>
        </RadioButtonGroup>
    </FlowLayout>
</DetailComponent>
image-20251124-124712.png