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>.NotifyFieldChanged

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.Localize

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.UICulture

RadzenComponent.DefaultUICulture

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 to this section

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 to this section

Gets or sets the items alignment.

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

AriaLabelledByLink to this section

Gets or sets the id of an external element that labels the radio group. Sets the aria-labelledby attribute.

Declaration
public string AriaLabelledBy { get; set; }
Property Value
Type Description
stringGets or sets the id of an external element that labels the radio group. Sets the aria-labelledby attribute.

DataLink to this section

Gets or sets the data.

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

DisabledPropertyLink to this section

Gets or sets the disabled property.

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

GapLink to this section

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 to this section

Gets or sets the items.

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

JustifyContentLink to this section

Gets or sets the content justify.

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

OrientationLink to this section

Gets or sets the orientation.

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

TextPropertyLink to this section

Gets or sets the text property.

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

ValuePropertyLink to this section

Gets or sets the value property.

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

VisiblePropertyLink to this section

Gets or sets the visible property.

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

WrapLink to this section

Gets or sets the wrap.

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

Methods

AddItemLink to this section

Adds the item.

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

BuildRenderTreeLink to this section

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

GetComponentCssClassLink to this section

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

IsSelectedLink to this section

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 to this section

Declaration
protected override void OnParametersSet()

RefreshLink to this section

Refreshes this instance.

Declaration
public void Refresh()

RemoveItemLink to this section

Removes the item.

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

SelectItemLink to this section

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 🗙