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.v20.2.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

Web Forms:

<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

See Also