New to Telerik UI for BlazorStart a free 30-day trial

A component that lets users select a single option from a list of radio items. Supports vertical/horizontal RadioGroupLayout, label position via RadioGroupLabelPosition, binding to Data with TextField and ValueField, two-way value binding through Value/ValueChanged and ValueExpression, item templating via ItemTemplate, sizing (Size), ARIA attributes, validation with ValidateOn, and blur/change events.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

TValue

Syntax:

C#
public class TelerikRadioGroup<TItem, TValue> : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikRadioGroup<TItem, TValue>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)...

Constructors

C#
public TelerikRadioGroup()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
public override void Dispose()

Overrides: BaseComponent.Dispose()

Moves focus to the radio button corresponding to the specified index.

C#
public Task FocusItemAsync(int index)
Parameters:indexintReturns:

Task

C#
protected override Task OnParametersSetAsync()
Returns:

Task

Overrides: ComponentBase.OnParametersSetAsync()

C#
public override Task SetParametersAsync(ParameterView parameters)
Parameters:parametersParameterViewReturns:

Task

Overrides: ComponentBase.SetParametersAsync(ParameterView)

Properties

[Accessibility] Defines the aria-describedby attribute for the component.

C#
[Parameter]
public string AriaDescribedBy { get; set; }

[Accessibility] Describe the aria-label attribute for the component.

C#
[Parameter]
public string AriaLabel { get; set; }

[Accessibility] Describe the aria-labelledby attribute for the component.

C#
[Parameter]
public string AriaLabelledBy { get; set; }
C#
[CascadingParameter]
public EditContext CascadedEditContext { get; set; }
C#
[Parameter]
public IEnumerable<TItem> Data { get; set; }

Gets or sets the description used for the data-smart-paste attribute.

C#
[Parameter]
public string DataSmartPasteDescriptionAttribute { get; set; }

The name of the field in the data model that indicates whether an item is disabled.

C#
[Parameter]
public string DisabledField { get; set; }

Specifies if the Component accepts user interaction and value changes. The default value is "true".

C#
[Parameter]
public bool Enabled { get; set; }

Specifies the id of the Component.

C#
[Parameter]
public string Id { get; set; }

Defines the item template of the radio items.

C#
[Parameter]
public RenderFragment<TItem> ItemTemplate { get; set; }

Defines where to render the radio labels. Default value is After.

C#
[Parameter]
public RadioGroupLabelPosition LabelPosition { get; set; }

Defines the layout of the group whether the buttons should be ordered vertically, or horizontally. Default value is Vertical.

C#
[Parameter]
public RadioGroupLayout Layout { get; set; }

[Accessibility] The name attribute that the inputs get.

C#
[Parameter]
public string Name { get; set; }

Fires when the component loses focus.

C#
[Parameter]
public virtual EventCallback OnBlur { get; set; }

Specifies the callback that's called when the current value is committed (confirmed) by the user - either through the Enter key, or when the Component loses focus.

C#
[Parameter]
public virtual EventCallback<object> OnChange { get; set; }

Specifies the size of the radio buttons.

C#
[Parameter]
public string Size { get; set; }

[Accessibility] Maps to the tabindex attribute of the element. Use it to customize the tabbing focus order on the page.

C#
[Parameter]
public int? TabIndex { get; set; }
C#
[Parameter]
public string TextField { get; set; }

Defines the event which specifies when validation is triggered.

C#
[Parameter]
public ValidationEvent ValidateOn { get; set; }

Value

TValue

Specifies the value of the input. Used with two-way binding.

C#
[Parameter]
public virtual TValue Value { get; set; }

Specifies the callback that's called when the value changes.

C#
[Parameter]
public EventCallback<TValue> ValueChanged { get; set; }

Specifies the expression that identifies the bound value.

C#
[Parameter]
public Expression<Func<TValue>> ValueExpression { get; set; }
C#
[Parameter]
public string ValueField { get; set; }