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

Defines the fluent API for configuring the Kendo UI CheckBoxGroup

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

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

Inheritance: objectHelperResultWidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>CheckBoxGroupBuilder

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ToComponent()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Expression(string)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Name(string)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Deferred(bool)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.HtmlAttributes(object)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.Render()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ToHtmlString()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ToClientTemplate()WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.AsModule(bool)WidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ComponentWidgetBuilderBase<CheckBoxGroup, CheckBoxGroupBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.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 CheckBoxGroupBuilder class.

C#
public CheckBoxGroupBuilder(CheckBoxGroup component)
Parameters:componentCheckBoxGroup

Methods

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 CheckBoxGroupBuilder BindTo(IEnumerable<IInputGroupItem> values)
Parameters:valuesIEnumerable<IInputGroupItem>

The action that configures the items.

Returns:

CheckBoxGroupBuilder

Returns the current instance of CheckBoxGroupBuilder for method chaining.

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 action that configures the items.

Returns:

CheckBoxGroupBuilder

Returns the current instance of CheckBoxGroupBuilder for method chaining.

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 value for Enabled

Returns:

CheckBoxGroupBuilder

Returns the current CheckBoxGroupBuilder instance.

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

Returns the current CheckBoxGroupBuilder instance.

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 for InputName

Returns:

CheckBoxGroupBuilder

Returns the current CheckBoxGroupBuilder instance.

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 for InputRounded

Returns:

CheckBoxGroupBuilder

Returns the current CheckBoxGroupBuilder instance.

Sets a value controlling the size of the input.

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

The value for InputSize

Returns:

CheckBoxGroupBuilder

Returns the current CheckBoxGroupBuilder instance.

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 CheckBoxGroupItemFactory for the items setting.

Returns:

CheckBoxGroupBuilder

Returns the current instance of CheckBoxGroupBuilder .

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

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

The value for LabelPosition

Returns:

CheckBoxGroupBuilder

Returns the current CheckBoxGroupBuilder instance.

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

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

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

The value that configures the labelposition.

Returns:

CheckBoxGroupBuilder

Returns the current instance of CheckBoxGroupBuilder for method chaining.

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").

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

The value for Layout

Returns:

CheckBoxGroupBuilder

Returns the current CheckBoxGroupBuilder instance.

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

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

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

The value that configures the layout.

Returns:

CheckBoxGroupBuilder

Returns the current instance of CheckBoxGroupBuilder for method chaining.

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

Returns the current instance of CheckBoxGroupBuilder for method chaining.

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