FormControlRadioButton
in namespace DotVVM.Bootstrap5.Controls
Extends the RadioButton control for usage in Form.
Usage & Scenarios
A special version of the RadioButton control that can be used in Form.
See RadioButton for more info on how to use this control.
Sample 1: Basic Usage
<bs:FormControlRadioButton HelpText="Help Text">
<bs:RadioButton ID="r" CheckedItem="{value: Color}" CheckedValue="r" Text="R" />
<bs:RadioButton ID="g" CheckedItem="{value: Color}" CheckedValue="g" Text="G" />
<bs:RadioButton ID="b" CheckedItem="{value: Color}" CheckedValue="b" Text="B" />
</bs:FormControlRadioButton>
public class ViewModel : DotvvmViewModelBase
{
public string Color { get; set; }
}
Properties
| Name | Type | Description | Notes | Default Value | |
|---|---|---|---|---|---|
| ClientIDMode | ClientIDMode | Gets or sets the client ID generation algorithm. |
attribute
static value
|
Static | |
| Content | List<RadioButton> | Gets or sets a collection of RadioButton controls, that are validated together. |
inner element
static value
default
|
null | |
| DataContext | Object | Gets or sets a data context for the control and its children. All value and command bindings are evaluated in context of this value. The DataContext is null in client-side templates. |
attribute
bindable
|
null | |
| Enabled | Boolean |
attribute
static value
bindable
|
True | ||
| FormControlCssClass | String | Gets or sets the CSS class to apply to the form control element. |
attribute
static value
|
null | |
| HelpContent | List<DotvvmControl> | Gets or sets a custom template for for the help text. Cannot be combined with a `HelpText` property. |
inner element
static value
|
null | |
| HelpText | String | Gets or sets a plain text for the help text. Cannot be combined with a `HelpContent` property. |
attribute
static value
bindable
|
null | |
| ID | String | Gets or sets the control client ID within its naming container. |
attribute
static value
bindable
|
null | |
| IncludeInPage | Boolean | Gets or sets whether the control is included in the DOM of the page. |
attribute
bindable
|
True | |
| Visible | Boolean | Gets or sets whether the control is visible. When set to false, `style="display: none"` will be added to this control. |
attribute
static value
bindable
|
True |