RadioButton
The RadioButton component is a radio button.
Contents
Usage
Get the Value
From JavaScript: $('#ComponentName').is(':checked'); will return true (marked) or false (unmarked).
Set the Value
From JavaScript: $('#ComponentName').attr('checked', value);, where value may be true (marked) or false (unmarked).
Get the Selected Item
You can use the Group property of a RadioButton to define the group of radio buttons it belongs to. Only one radio button from a group can be selected at a time.
To get the name of the selected RadioButton of a group from JavaScript: $("input[@name=ComponentsGroup]:checked").attr('id');.
Client-side Features
DOM Elements
The component generates the following client-side DOM elements:
- Wrapper (HTMLDivElement). Full web browser support. Access it with
$("#ComponentName_outer").get()[0].- table (HTMLTableElement). Full web browser support. Access it with:
$("#ComponentName_table").get()[0].- tr
- td
- Main element (HTMLInputElement). Full web browser support. Access it with:
$("#ComponentName").get()[0].
- Main element (HTMLInputElement). Full web browser support. Access it with:
- td
- Label (HTMLSpanElement). Full web browser support. Access it with:
$("#ComponentName_caption").get()[0].
- Label (HTMLSpanElement). Full web browser support. Access it with:
- td
- tr
- table (HTMLTableElement). Full web browser support. Access it with:
Client-side Events
- Documented in the RPCL Reference.
Server-side Features
Properties, Methods and Events
- Documented in the RPCL Reference.
See Also
- Alternatives: MRadioButton (mobile applications).
- RadioGroup, CheckBox.