CheckBoxGroupItemBuilder
Methods
CssClass(System.String)
Any custom classes that should be attached to the k-checkbox-item element.
Parameters
value - System.String
The value that configures the cssclass.
Example
@( 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");
})
)
Enabled(System.Boolean)
Defines whether the checkbox is enabled or not. By default all checkboxes are enabled.
Parameters
value - System.Boolean
The boolean value that configures the enabled.
Example
@( 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");
})
)
Encoded(System.Boolean)
Determines whether the checkbox label content should be rendered as an HTML string or it should be encoded.
Parameters
value - System.Boolean
The boolean value that configures the encoded.
Example
@( 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");
})
)
Label(System.String)
Specifies the label content for the checkbox.
Parameters
value - System.String
The value that configures the label.
Example
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =>
{
i.Add().Label("Spain").Value("1");
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)
Value(System.String)
Specifies the value for the checkbox.
Parameters
value - System.String
The value that configures the value.
Example
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =>
{
i.Add().Label("Spain").Value("1");
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)
HtmlAttributes(System.Object)
Collection of key-value pairs that would be used to generate the attributes attached to each k-checkbox-item element.
Parameters
value - System.Object
The value that configures the htmlattributes.
Example
@( Html.Kendo().CheckBoxGroup()
.Name("CheckBoxGroup")
.Items(i =>
{
i.Add().Label("Spain").Value("1").HtmlAttributes(new { @class = "spain" });
i.Add().Label("Italy").Value("2");
i.Add().Label("UK").Value("3");
})
)