DevExtreme v23.1 is now available.
Explore our newest features/capabilities and share your thoughts with us.
The RadioGroup component contains a set of radio buttons and allows users to select one item from it. This demo illustrates how to bind the component to data, change the component layout, define a custom template, and handle the value change event.
You can display RadioGroup items from the items array or a dataSource. If your data is an array of objects, use the displayExpr and valueExpr properties. displayExpr specifies a data source field that contains button captions. valueExpr specifies a data source field that supplies values to the value property when users select a button. Leave valueExpr unspecified if you need to supply the entire data object to the value property.
The RadioGroup supports horizontal (default for tablets) and vertical (default for other devices) layouts. To change the layout for all device types, specify the layout property.
Define the itemTemplate to customize the item appearance. To customize an individual item, specify its template property.
You can set the value property to one of the data source items to specify a predefined selection. Implement the onValueChanged function to handle value changes.