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:
public class TelerikRadioGroup<TItem, TValue> : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikRadioGroup<TItem, TValue>
Implements:
Inherited Members
Constructors
public TelerikRadioGroup()
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
public override void Dispose()
Overrides:
public override Task SetParametersAsync(ParameterView parameters)
Overrides:
Properties
[Accessibility] Defines the aria-describedby attribute for the component.
[Parameter]
public string AriaDescribedBy { get; set; }
[Accessibility] Describe the aria-label attribute for the component.
[Parameter]
public string AriaLabel { get; set; }
[Accessibility] Describe the aria-labelledby attribute for the component.
[Parameter]
public string AriaLabelledBy { get; set; }
[CascadingParameter]
public EditContext CascadedEditContext { get; set; }
Data
IEnumerable<TItem>
[Parameter]
public IEnumerable<TItem> Data { get; set; }
Gets or sets the description used for the data-smart-paste attribute.
[Parameter]
public string DataSmartPasteDescriptionAttribute { get; set; }
The name of the field in the data model that indicates whether an item is disabled.
[Parameter]
public string DisabledField { get; set; }
Specifies if the Component accepts user interaction and value changes. The default value is "true".
[Parameter]
public bool Enabled { get; set; }
ItemTemplate
RenderFragment<TItem>
Defines the item template of the radio items.
[Parameter]
public RenderFragment<TItem> ItemTemplate { get; set; }
Defines where to render the radio labels. Default value is After.
[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.
[Parameter]
public RadioGroupLayout Layout { get; set; }
[Accessibility] The name attribute that the inputs get.
[Parameter]
public string Name { get; set; }
Fires when the component loses focus.
[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.
[Parameter]
public virtual EventCallback<object> OnChange { get; set; }
[Accessibility] Maps to the tabindex attribute of the element. Use it to customize the tabbing focus order on the page.
[Parameter]
public int? TabIndex { get; set; }
Defines the event which specifies when validation is triggered.
[Parameter]
public ValidationEvent ValidateOn { get; set; }
Value
TValue
Specifies the value of the input. Used with two-way binding.
[Parameter]
public virtual TValue Value { get; set; }
ValueChanged
EventCallback<TValue>
Specifies the callback that's called when the value changes.
[Parameter]
public EventCallback<TValue> ValueChanged { get; set; }
ValueExpression
Expression<Func<TValue>>
Specifies the expression that identifies the bound value.
[Parameter]
public Expression<Func<TValue>> ValueExpression { get; set; }
[Parameter]
public string ValueField { get; set; }