RadioButtonFormGroup

in namespace DotVVM.Framework.Controls.Bootstrap4

Renders a FormGroup control with a RadioButton

Usage & Scenarios

Represents a RadioButton in FormGroup.

Sample 1: Form Group properties

RadioButtonFormGroup is just wrapper around RadioButton inside FormGroup, so you can use any of the properties of the FormGroup and RadioButton to configure desired behavior.

For example you can use the Label property to set the Label of the FormGroup.

<bs:Form>
    <bs:RadioButtonFormGroup Checked="{value: IsChecked}" CheckedValue="{value: true}" GroupName="RadioGroup" Text="yes" LabelText="Label" />
    <bs:RadioButtonFormGroup Checked="{value: IsChecked}" CheckedValue="{value: false}" GroupName="RadioGroup" Text="no" LabelText="Label" />
</bs:Form>
using DotVVM.Framework.ViewModel;

namespace DotvvmWeb.Views.Docs.Controls.bootstrap4.RadioButtonFormGroup.sample1
{
    public class ViewModel : DotvvmViewModelBase
    { 

        public bool IsChecked { get; set; }
    }
}

Properties

Name Type Description Notes Default Value
property icon Checked Boolean Gets or sets whether the control is checked.
attribute
inner element
static value
bindable
default
False
property icon CheckedItem Object Gets or sets the CheckedValue of the first RadioButton that is checked and bound to this collection.
attribute
inner element
static value
bindable
default
null
property icon CheckedValue Object Gets or sets the value that will be used as a result when the control is checked. Use this property in combination with the CheckedItem or CheckedItems property.
attribute
inner element
static value
bindable
default
null
property icon ContentTemplate List<DotvvmControl> Gets or sets the content of the form group.
attribute
inner element
static value
bindable
default
null
property icon Enabled Boolean Gets or sets a value indicating whether the control is enabled and can be clicked on.
attribute
inner element
static value
bindable
default
False
property icon FormControlStyle BootstrapFormStyle Gets or sets whether the control should use default or custom style.
attribute
inner element
static value
bindable
default
Default
property icon GroupName String Gets or sets an unique name of the radio button group.
attribute
inner element
static value
bindable
default
property icon LabelSize Int32? Gets or sets the size of size the label area for all screen sizes. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeLG Int32? Gets or sets the size of the label area large screen. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeMD Int32? Gets or sets the size of the label area for medium screen. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeSM Int32? Gets or sets the size of the label area small screen. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeXL Int32? Gets or sets the size of the label area for extra large screen. This applies only to the Horizontal forms.
attribute
inner element
static value
bindable
default
null
property icon LabelTemplate ITemplate Gets or sets the template of the label area. This property cannot be combined with the LabelText property.
attribute
inner element
static value
bindable
default
null
property icon LabelText String Gets or sets the label text. This property cannot be combined with the LabelTemplate property.
attribute
inner element
static value
bindable
default
null
property icon Size Size Gets or sets the size of controls in the form group.
attribute
inner element
static value
bindable
default
Default
property icon Text String Gets or sets the label text that is rendered next to the control.
attribute
inner element
static value
bindable
default
property icon Type FormGroupType Gets or sets the type of the form.
attribute
inner element
static value
bindable
default
Default

Events

Name Type Description
event icon Changed Command Gets or sets the command that will be triggered when the control check state is changed.

HTML produced by the control