BuilderFactoryExtensions.BootstrapCheckBoxList(BuilderFactory, String) Method

Creates a Check Box List control with a specified name.

Namespace: DevExpress.AspNetCore

Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll

Declaration

public static BootstrapCheckBoxListBuilder BootstrapCheckBoxList(
    this BuilderFactory builderFactory,
    string name
)
<ExtensionAttribute>
Public Shared Function BootstrapCheckBoxList(
    builderFactory As BuilderFactory,
    name As String
) As BootstrapCheckBoxListBuilder

Parameters

Type Name Description
BuilderFactory builderFactory

A BuilderFactory object providing access to Check Box List settings.

String name

A control name.

Returns

Type Description
BootstrapCheckBoxListBuilder

A builder for a Check Box List control.

The code sample below demonstrates how you can use this method to create a Check Box List control.

@(Html.DevExpress()
    .BootstrapCheckBoxList("checkBoxListDefault")
    .Items(items => {
        items.Add()
            .Text("WinForms")
            .Value("WinForms");
        items.Add()
            .Text("ASP.NET")
            .Value("ASP.NET")
            .Selected(true);
        items.Add()
            .Text("ASP.NET MVC")
            .Value("ASP.NET MVC")
            .Selected(true);
        items.Add()
            .Text("WPF")
            .Value("WPF");
    }))

See Also