Skip to main content
Tab

GridViewCommandColumn.ShowSelectCheckbox Property

Specifies whether the control displays an editor (check box or radio button) for row selection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

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

Property Value

Type Default Description
Boolean false

true to enable the check box selection mode; otherwise, false.

Remarks

Set the ShowSelectCheckbox property to true to enable the check box selection mode. The AllowSelectSingleRowOnly property defines the editor type (check box or radio button) that the control dispalys within command column cells.

When row selection changes, the control raises the server-side ASPxGridBase.SelectionChanged or the client-side ASPxClientGridView.SelectionChanged event (based on the ProcessSelectionChangedOnServer property value).

When cell merge is enabled, ASPxGridView does not support row selection.

Example

GridViewCommandColumn - ShowSelectCheckbox Property

Web Forms

Run Demo: ASPxGridView - Row Selection (Web Forms)

<dx:ASPxGridView ID="grid" runat="server" KeyFieldName="CustomerID" AutoGenerateColumns="false">
    <Columns>
        <dx:GridViewCommandColumn ShowSelectCheckbox="true" />
        <%--...--%>
    </Columns>
</dx:ASPxGridView>

MVC

Run Demo: GridView - Row Selection (MVC)

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

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