RadioGroup

The dxRadioGroup is a widget that contains a set of radio buttons and allows an end user to make a single selection from the set.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js
RadioGroup interactive configuration
Copy Code
Copy to Codepen
$("#radiogroup").dxRadioGroup({
});

You can create the widget using one of the following approaches.

  • jQuery
    Use the dxRadioGroup jQuery plug-in.

    HTML
    <div id="radioGroup"></div>
    JavaScript
    $("#radioGroup").dxRadioGroup({
        dataSource: radioGroupData,
        layout: 'vertical'
    });
  • Knockout
    Add a div element and apply the dxRadioGroup binding to this element.

    HTML
    <div data-bind="dxRadioGroup: {
        dataSource: radioGroupData,
        layout: 'vertical'
    }"></div>
  • AngularJS
    Add a div element and apply the dx-radio-group directive to this element.

    HTML
    <div dx-radio-group="{
        dataSource: radioGroupData,
        layout: 'vertical'
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the Installation article.

Since the dxRadioGroup widget is used to display multiple items, it supports common Collection Container widget functionality. You can find the detailed information on principles of working with the widget in the dxRadioGroup section of the Collection Container Widgets article.

View Demo

Watch Video

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxRadioGroup widget.

Methods

This section describes the members used to manipulate the widget.

Events

This section describes events fired by this widget.

Default Item Template

This section lists the data source fields that are used in a default item template.

By default, a predefined item template is applied to display the items of this widget. This template is based on certain fields of the data source provided for this widget. Below is the list of these fields. If the default item template is not appropriate for your task, implement a custom item template based on these or other fields of your data source.

See Also