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

Defines the fluent API for configuring the Telerik UI for ASP.NET MVC RadioButton.

Definition

Constructors

Initializes a new instance of the RadioButton class.

C#
public RadioButtonBuilder(RadioButton component)
Parameters:componentRadioButton

The component.

Methods

Defines the checked state of the RadioButton.

C#
public RadioButtonBuilder Checked(bool value)
Parameters:valuebool

The value that configures the checked state.

Returns:

RadioButtonBuilder

Example:
C#
@(Html.Kendo().RadioButton()
.Name("radioBtn1")
.Checked(true)
)

If set to "false", the RadioButton will be disabled and will not allow the user to change its state.

C#
public RadioButtonBuilder Enable(bool value)
Parameters:valuebool

The value that enables or disables the component.

Returns:

RadioButtonBuilder

Example:
C#
@(Html.Kendo().RadioButton()
.Name("radioBtn1")
.Enable(false)
)

Determines whether the label content must be rendered as an HTML string or it must be encoded.

C#
public RadioButtonBuilder Encoded(bool value)
Parameters:valuebool

The value that configures the Encoded option.

Returns:

RadioButtonBuilder

Example:
C#
@(Html.Kendo().RadioButton()
.Name("radioBtn1")
.Label("<strong>Agree</strong>")
.Encoded(false)
)

Configures the handled client-side events of the RadioButton.

C#
public RadioButtonBuilder Events(Action<RadioButtonEventBuilder> configurator)
Parameters:configuratorAction<RadioButtonEventBuilder>

The action that configures the available events.

Returns:

RadioButtonBuilder

Example:
C#
@(Html.Kendo().RadioButton()
.Name("RadioButton")
.Events(events =&gt; events .Change("onChange"))
)

Specifies the label content for the RadioButton.

C#
public RadioButtonBuilder Label(string value)
Parameters:valuestring

The value that configures the label.

Returns:

RadioButtonBuilder

Example:
C#
@(Html.Kendo().RadioButton()
.Name("radioBtn1")
.Label("Agree")
)

Sets a value controlling the size of the component.

C#
public RadioButtonBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The enum value that configures the size.

Returns:

RadioButtonBuilder

Example:
C#
@(Html.Kendo().RadioButton()
.Name("radioBtn1")
.Size(ComponentSize.Medium)
)

Sets the value of the radio button.

C#
public RadioButtonBuilder Value(object value)
Parameters:valueobjectReturns:

RadioButtonBuilder