Skip to main content
A newer version of this page is available. .
Tab

GridViewCommandColumn.ShowSelectCheckbox Property

Gets or sets whether an editor(a check box or radio button) used to select/deselect data rows is shown.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

[DefaultValue(false)]
public bool ShowSelectCheckbox { get; set; }

Property Value

Type Default Description
Boolean **false**

true to show the check box or radio button within command column cells; otherwise, false.

Remarks

The editor type (check box or radio button) displayed within command column cells is determined automatically, based on the ASPxGridViewBehaviorSettings.AllowSelectSingleRowOnly property value.

Concept

Example

WebForms:

<dx:ASPxGridView ID="grid" runat="server" DataSourceID="CustomersDataSource" KeyFieldName="CustomerID">
    <Columns>
        <dx:GridViewCommandColumn ShowSelectCheckbox="true" />
        ...
    </Columns>
    ...
</dx:ASPxGridView>

MVC:

@Html.DevExpress().GridView(settings => {
    settings.Name = "gvRowSelection";

    settings.KeyFieldName = "CustomerID";
    settings.CommandColumn.Visible = true;
    settings.CommandColumn.ShowSelectCheckbox = true;
    ...
}).Bind(Model).GetHtml()

Online Demos

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowSelectCheckbox property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also