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

Defines the fluent API for configuring the CheckBoxGroupItem settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class CheckBoxGroupItemBuilder

Inheritance: objectCheckBoxGroupItemBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public CheckBoxGroupItemBuilder(CheckBoxGroupItem settings)
Parameters:settingsCheckBoxGroupItem

The CheckBoxGroupItem

Methods

Any custom classes that should be attached to the k-checkbox-item element.

C#
public CheckBoxGroupItemBuilder CssClass(string value)
Parameters:valuestring

The value that configures the cssclass.

Returns:

CheckBoxGroupItemBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =>
{
i.Add().Label("Spain").CssClass("spain").Value("1");
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)

Defines whether the checkbox is enabled or not. By default all checkboxes are enabled.

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

The boolean value that configures the enabled.

Returns:

CheckBoxGroupItemBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =>
{
i.Add().Label("Spain").Enabled(false).Value("1");
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)

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

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

The boolean value that configures the encoded.

Returns:

CheckBoxGroupItemBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =>
{
i.Add().Label("<strong>Spain</strong>").Encoded(false).Value("1");
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)
C#
public CheckBoxGroupItemBuilder HtmlAttributes(IDictionary<string, object> value)
Parameters:valueIDictionary<string, object>Returns:

CheckBoxGroupItemBuilder

Collection of key-value pairs that would be used to generate the attributes attached to each k-checkbox-item element.

C#
public CheckBoxGroupItemBuilder HtmlAttributes(object value)
Parameters:valueobject

The value that configures the htmlattributes.

Returns:

CheckBoxGroupItemBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =&gt;
{
i.Add().Label("Spain").Value("1").HtmlAttributes(new { @class = "spain" });
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)

Specifies the label content for the checkbox.

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

The value that configures the label.

Returns:

CheckBoxGroupItemBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =&gt;
{
i.Add().Label("Spain").Value("1");
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)

Specifies the value for the checkbox.

C#
public CheckBoxGroupItemBuilder Value(string value)
Parameters:valuestring

The value that configures the value.

Returns:

CheckBoxGroupItemBuilder

Example:
C#
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =&gt;
{
i.Add().Label("Spain").Value("1");
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)