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
Property Value
Type | Default | Description |
---|---|---|
Boolean | 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
Web Forms
<dx:ASPxGridView ID="grid" runat="server" KeyFieldName="CustomerID" AutoGenerateColumns="false">
<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()