Content-Length: 84552 | pFad | https://docs.telerik.com/aspnet-mvc/html-helpers/editors/checkboxgroup/overview

ASP.NET MVC Editors CheckBoxGroup Overview - Telerik UI for ASP.NET MVC
New to Telerik UI for ASP.NET MVCStart a free 30-day trial

ASP.NET MVC CheckBoxGroup Overview

The Telerik UI CheckBoxGroup HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI CheckBoxGroup widget.

The CheckBoxGroup allows to style and provide checkbox functionality to list elements, set the position of the labels, attributes and custom css classes.

Initializing the CheckBoxGroup

The following example demonstrates how to define the CheckBoxGroup.

Razor
    @(Html.Kendo().CheckBoxGroup()
        .Name("checkboxgroup")
    )

Basic Configuration

The following example demonstrates the basic configuration for the CheckBoxGroup.

Razor
    @(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(new string[] { "1" })
    )
    <script>
    $(function() {
        // The Name() of the CheckBoxGroup is used to get its client-side instance.
        var checkboxgroup = $("#checkboxgroup").data("kendoCheckBoxGroup");
    });
    </script>

Functionality and Features

  • Binding—You can bind the CheckBoxGroup's items by using its Items configuration method or the BindTo method to bind to a view model.
  • Label—The CheckBoxGroup allows you to customize the text and appearance of its labels.
  • Layout—The CheckBoxGroup supports two types of layout - horizontal and vertical.

Next Steps

See Also









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://docs.telerik.com/aspnet-mvc/html-helpers/editors/checkboxgroup/overview

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy