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

Defines the fluent API for configuring CheckBoxGroupItem

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

CheckBoxGroupItemBuilder method.

C#
public CheckBoxGroupItemBuilder(CheckBoxGroupItem container)
Parameters:containerCheckBoxGroupItem

Properties

Gets the settings being configured.

C#
protected CheckBoxGroupItem Container { get; }

Methods

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

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

The value for CssClass

Returns:

CheckBoxGroupItemBuilder

Returns the current CheckBoxGroupItemBuilder instance.

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

Returns:

CheckBoxGroupItemBuilder

Returns the current CheckBoxGroupItemBuilder instance.

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

Returns:

CheckBoxGroupItemBuilder

Returns the current CheckBoxGroupItemBuilder instance.

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

Returns:

CheckBoxGroupItemBuilder

Returns the current CheckBoxGroupItemBuilder instance.

Specifies the label content for the checkbox.

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

The value for Label

Returns:

CheckBoxGroupItemBuilder

Returns the current CheckBoxGroupItemBuilder instance.

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

Returns:

CheckBoxGroupItemBuilder

Returns the current CheckBoxGroupItemBuilder instance.

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");
})
)