RadzenRadioButtonList<TValue> Class

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.

Inheritance

Object

ComponentBase

RadzenComponent

FormComponent<TValue>

RadzenRadioButtonList<TValue>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IRadzenFormComponent

Inherited Members

FormComponent<TValue>.SetParametersAsync

FormComponent<TValue>.Dispose

FormComponent<TValue>.GetValue

FormComponent<TValue>.OnContextMenu

FormComponent<TValue>.GetClassList

FormComponent<TValue>.FocusAsync

FormComponent<TValue>.Name

FormComponent<TValue>.TabIndex

FormComponent<TValue>.Placeholder

FormComponent<TValue>.Disabled

FormComponent<TValue>.EditContext

FormComponent<TValue>.Form

FormComponent<TValue>.ValueChanged

FormComponent<TValue>.HasValue

FormComponent<TValue>.IsBound

FormComponent<TValue>.Value

FormComponent<TValue>.Change

FormComponent<TValue>.FieldIdentifier

FormComponent<TValue>.ValueExpression

FormComponent<TValue>.FormFieldContext

FormComponent<TValue>.CurrentPlaceholder

FormComponent<TValue>._value

RadzenComponent.OnMouseEnter

RadzenComponent.OnMouseLeave

RadzenComponent.GetCssClass

RadzenComponent.GetId

RadzenComponent.Debounce

RadzenComponent.OnInitialized

RadzenComponent.OnAfterRenderAsync

RadzenComponent.RaiseContextMenu

RadzenComponent.RaiseMouseEnter

RadzenComponent.AddContextMenu

RadzenComponent.RaiseMouseLeave

RadzenComponent.OnBecameInvisible

RadzenComponent.Attributes

RadzenComponent.Element

RadzenComponent.MouseEnter

RadzenComponent.MouseLeave

RadzenComponent.ContextMenu

RadzenComponent.Culture

RadzenComponent.DefaultCulture

RadzenComponent.Style

RadzenComponent.Visible

RadzenComponent.UniqueID

RadzenComponent.JSRuntime

RadzenComponent.IsJSRuntimeAvailable

RadzenComponent.Reference

RadzenComponent.CurrentStyle

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

Syntax

public class RadzenRadioButtonList<TValue> : FormComponent<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponent

Type Parameters

Name Description
TValueThe type of the selected value. Each radio button option has a value of this type.

Examples

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" />

Constructors

RadzenRadioButtonList<TValue>link

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.

Declaration
public RadzenRadioButtonList<TValue>()

Properties

AlignItemslink

Gets or sets the items alignment.

Declaration
public AlignItems AlignItems { get; set; }
Property Value
Type Description
AlignItemsGets or sets the items alignment.

Datalink

Gets or sets the data.

Declaration
public Collections.IEnumerable Data { get; set; }
Property Value
Type Description
Collections.IEnumerableGets or sets the data.

DisabledPropertylink

Gets or sets the disabled property.

Declaration
public string DisabledProperty { get; set; }
Property Value
Type Description
stringGets or sets the disabled property.

Gaplink

Gets or sets the spacing between items

Declaration
public string Gap { get; set; }
Property Value
Type Description
stringGets or sets the spacing between items

Itemslink

Gets or sets the items.

Declaration
public RenderFragment Items { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the items.

JustifyContentlink

Gets or sets the content justify.

Declaration
public JustifyContent JustifyContent { get; set; }
Property Value
Type Description
JustifyContentGets or sets the content justify.

Orientationlink

Gets or sets the orientation.

Declaration
public Orientation Orientation { get; set; }
Property Value
Type Description
OrientationGets or sets the orientation.

TextPropertylink

Gets or sets the text property.

Declaration
public string TextProperty { get; set; }
Property Value
Type Description
stringGets or sets the text property.

ValuePropertylink

Gets or sets the value property.

Declaration
public string ValueProperty { get; set; }
Property Value
Type Description
stringGets or sets the value property.

VisiblePropertylink

Gets or sets the visible property.

Declaration
public string VisibleProperty { get; set; }
Property Value
Type Description
stringGets or sets the visible property.

Wraplink

Gets or sets the wrap.

Declaration
public FlexWrap Wrap { get; set; }
Property Value
Type Description
FlexWrapGets or sets the wrap.

Methods

AddItemlink

Adds the item.

Declaration
public void AddItem(RadzenRadioButtonListItem<TValue> item)
Parameters
Type Name Description
RadzenRadioButtonListItem<TValue> item The item.

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

IsSelectedlink

Determines whether the specified item is selected.

Declaration
protected bool IsSelected(RadzenRadioButtonListItem<TValue> item)
Parameters
Type Name Description
RadzenRadioButtonListItem<TValue> item The item.
Returns
Type Description
booltrue if the specified item is selected; otherwise, false.

OnParametersSetlink

Declaration
protected override void OnParametersSet()

Refreshlink

Refreshes this instance.

Declaration
public void Refresh()

RemoveItemlink

Removes the item.

Declaration
public void RemoveItem(RadzenRadioButtonListItem<TValue> item)
Parameters
Type Name Description
RadzenRadioButtonListItem<TValue> item The item.

SelectItemlink

Selects the item.

Declaration
protected Task SelectItem(RadzenRadioButtonListItem<TValue> item)
Parameters
Type Name Description
RadzenRadioButtonListItem<TValue> item The item.
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙