A radio button group component that allows users to select a single option from a list of choices. RadzenRadioButtonList displays multiple radio buttons with configurable layout, orientation, and data binding. Presents mutually exclusive options where only one can be selected at a time. Supports data binding via Data property or static item declaration, configurable layout including orientation (Horizontal/Vertical), gap spacing, wrapping, alignment, and justification, custom item templates for complex radio button content, disabled items individually or for the entire list, and keyboard navigation (Arrow keys, Space, Enter) for accessibility. Use for forms where users must choose one option from several, like payment methods, shipping options, or preference settings.
FormComponent<TValue>.SetParametersAsync
FormComponent<TValue>.GetValue
FormComponent<TValue>.OnContextMenu
FormComponent<TValue>.GetClassList
FormComponent<TValue>.FocusAsync
FormComponent<TValue>.TabIndex
FormComponent<TValue>.Placeholder
FormComponent<TValue>.Disabled
FormComponent<TValue>.EditContext
FormComponent<TValue>.ValueChanged
FormComponent<TValue>.HasValue
FormComponent<TValue>.FieldIdentifier
FormComponent<TValue>.ValueExpression
FormComponent<TValue>.FormFieldContext
FormComponent<TValue>.CurrentPlaceholder
RadzenComponent.OnAfterRenderAsync
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenRadioButtonList<TValue> : FormComponent<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponent| Name | Description |
|---|---|
| TValue | The type of the selected value. Each radio button option has a value of this type. |
Static radio button list:
<RadzenRadioButtonList @bind-Value=@selectedOption TValue="string" Orientation="Orientation.Vertical">
<Items>
<RadzenRadioButtonListItem Text="Option 1" Value="option1" />
<RadzenRadioButtonListItem Text="Option 2" Value="option2" />
<RadzenRadioButtonListItem Text="Option 3" Value="option3" />
</Items>
</RadzenRadioButtonList>
Data-bound radio list with disabled item:
<RadzenRadioButtonList @bind-Value=@paymentMethod TValue="int" Data=@paymentMethods
TextProperty="Name" ValueProperty="Id" DisabledProperty="IsDisabled" />A radio button group component that allows users to select a single option from a list of choices. RadzenRadioButtonList displays multiple radio buttons with configurable layout, orientation, and data binding. Presents mutually exclusive options where only one can be selected at a time. Supports data binding via Data property or static item declaration, configurable layout including orientation (Horizontal/Vertical), gap spacing, wrapping, alignment, and justification, custom item templates for complex radio button content, disabled items individually or for the entire list, and keyboard navigation (Arrow keys, Space, Enter) for accessibility. Use for forms where users must choose one option from several, like payment methods, shipping options, or preference settings.
public RadzenRadioButtonList<TValue>()Gets or sets the items alignment.
public AlignItems AlignItems { get; set; }
| Type | Description |
|---|---|
| AlignItems | Gets or sets the items alignment. |
Gets or sets the data.
public Collections.IEnumerable Data { get; set; }
| Type | Description |
|---|---|
| Collections.IEnumerable | Gets or sets the data. |
Gets or sets the disabled property.
public string DisabledProperty { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the disabled property. |
Gets or sets the spacing between items
public string Gap { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the spacing between items |
Gets or sets the items.
public RenderFragment Items { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets the items. |
Gets or sets the content justify.
public JustifyContent JustifyContent { get; set; }
| Type | Description |
|---|---|
| JustifyContent | Gets or sets the content justify. |
Gets or sets the orientation.
public Orientation Orientation { get; set; }
| Type | Description |
|---|---|
| Orientation | Gets or sets the orientation. |
Gets or sets the text property.
public string TextProperty { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the text property. |
Gets or sets the value property.
public string ValueProperty { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the value property. |
Gets or sets the visible property.
public string VisibleProperty { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the visible property. |
Adds the item.
public void AddItem(RadzenRadioButtonListItem<TValue> item)
| Type | Name | Description |
|---|---|---|
| RadzenRadioButtonListItem<TValue> | item | The item. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |
Determines whether the specified item is selected.
protected bool IsSelected(RadzenRadioButtonListItem<TValue> item)
| Type | Name | Description |
|---|---|---|
| RadzenRadioButtonListItem<TValue> | item | The item. |
| Type | Description |
|---|---|
| bool | true if the specified item is selected; otherwise, false. |
Removes the item.
public void RemoveItem(RadzenRadioButtonListItem<TValue> item)
| Type | Name | Description |
|---|---|---|
| RadzenRadioButtonListItem<TValue> | item | The item. |
Selects the item.
protected Task SelectItem(RadzenRadioButtonListItem<TValue> item)
| Type | Name | Description |
|---|---|---|
| RadzenRadioButtonListItem<TValue> | item | The item. |
| Type | Description |
|---|---|
| Task |