New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Kendo UI RadioGroup component

Definition

Constructors

Initializes a new instance of the RadioGroup class.

C#
public RadioGroup(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

Sets the enabled state of all radio buttons in the RadioGroup.

C#
public bool? Enabled { get; set; }

The name attribute to be used for the radio inputs. If omitted, the id of the wrapper element will be used.

C#
public string InputName { get; set; }

Sets a value controlling the size of the input.

C#
public ComponentSize? InputSize { get; set; }

Array of items to be rendered as radio buttons in the RadioGroup. If the array contains objects, their fields will be used for each radio button. If the array contains strings, those will be used as both value and label of the respective radio button.

C#
public List<RadioGroupItem> Items { get; set; }

Specifies the label position according to its radio button for all items in the widget. Accepts "before" and "after".

C#
public RadioGroupLabelPosition? LabelPosition { get; set; }

Specifies whether the radio buttons will be rendered one below the other ("vertical") or on the same line ("horizontal").

C#
public RadioGroupLayout? Layout { get; set; }

The selected (checked) radio button value. Will also be used as a RadioGroup widget value.

C#
public string Value { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The writer.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)