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

Defines the fluent API for configuring the Kendo CheckBoxGroup for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class CheckBoxGroupBuilder : WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>, IHtmlString

Inheritance: objectWidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>CheckBoxGroupBuilder

Implements: IHtmlString

Inherited Members WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ToComponent()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Name(string)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Deferred(bool)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ModelMetadata(ModelMetadata)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.HtmlAttributes(object)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.AsModule(bool)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Render()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ToHtmlString()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ToClientTemplate()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ToString()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Componentobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the CheckBoxGroup class.

C#
public CheckBoxGroupBuilder(CheckBoxGroup component)
Parameters:componentCheckBoxGroup

The component.

Methods

A collection 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 CheckBoxGroupBuilder BindTo(IList<IInputGroupItem> values)
Parameters:valuesIList<IInputGroupItem>

The collection of items.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.BindTo(Model.Items)
)

Array of items to be rendered as radio buttons in the RadioGroup. The strings in the array will be used as both value and label of the respective radio button.

C#
public CheckBoxGroupBuilder BindTo(string[] values)
Parameters:valuesstring[]

The array of items.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.BindTo(new[] { "English", "German", "Italian" })
)

Sets the enabled state of all checkboxes in the CheckBoxGroup.

C#
public CheckBoxGroupBuilder Enabled(bool value)
Parameters:valuebool

The boolean value that configures the state.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Enabled(false)
)

Configures the client-side events.

C#
public CheckBoxGroupBuilder Events(Action<CheckBoxGroupEventBuilder> configurator)
Parameters:configuratorAction<CheckBoxGroupEventBuilder>

The client events action.

Returns:

CheckBoxGroupBuilder

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

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

C#
public CheckBoxGroupBuilder InputName(string value)
Parameters:valuestring

The value that configures the inputname.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.InputName("language")
)

Sets a value controlling the border radius of the input.

C#
public CheckBoxGroupBuilder InputRounded(Rounded value)
Parameters:valueRounded

The value that configures the inputrounded.

Returns:

CheckBoxGroupBuilder

Sets a value controlling the size of the input.

C#
public CheckBoxGroupBuilder InputSize(ComponentSize value)
Parameters:valueComponentSize

The value that configures the inputsize.

Returns:

CheckBoxGroupBuilder

Array of items to be rendered as checkboxes in the CheckBoxGroup. If the array contains objects, their fields will be used for each checkbox configuration. If the array contains strings, those will be used as both value and label of the respective checkbox.

C#
public CheckBoxGroupBuilder Items(Action<CheckBoxGroupItemFactory> configurator)
Parameters:configuratorAction<CheckBoxGroupItemFactory>

The action that configures the items.

Returns:

CheckBoxGroupBuilder

Specifies the label position according to its input for all items in the widget. Accepts Before and After. The default value is After.

C#
public CheckBoxGroupBuilder LabelPosition(CheckBoxGroupLabelPosition value)
Parameters:valueCheckBoxGroupLabelPosition

The value that configures the labelposition.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.LabelPosition(CheckBoxGroupLabelPosition.Before)
)

Specifies the label position according to its radio button for all items in the component. Accepts "before" and "after". The default value is "after".

C#
public CheckBoxGroupBuilder LabelPosition(string value)
Parameters:valuestring

The value that configures the labelposition.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.LabelPosition("before")
)

Specifies whether the checkbox inputs will be rendered one below the other (Vertical) or on the same line (Horizontal). The default value is Vertical.

C#
public CheckBoxGroupBuilder Layout(CheckBoxGroupLayout value)
Parameters:valueCheckBoxGroupLayout

The value that configures the layout.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Layout(CheckBoxGroupLayout.Horizontal)
)

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

C#
public CheckBoxGroupBuilder Layout(string value)
Parameters:valuestring

The value that configures the layout.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Layout("horizontal")
)

Array of strings to specify the widget value.

C#
public CheckBoxGroupBuilder Value(IEnumerable<string> value)
Parameters:valueIEnumerable<string>

The array of values.

Returns:

CheckBoxGroupBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Value(new string[] { "1", "2" })
)