aspnet-devexpress-dot-web-dot-gridviewcommandcolumn-38955bae.md
Specifies whether ASPxGridView displays the Select command item within the command column.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(false)]
public bool ShowSelectButton { get; set; }
<DefaultValue(False)>
Public Property ShowSelectButton As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true if the Select button is visible; otherwise, false.
|
Set the ShowSelectButton property to true to enable row selection and display the Select command item within the command column.
Specify the SelectButton property to customize the button’s settings.
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).
<dx:ASPxGridView ID="grid1" runat="server" AutoGenerateColumns="false">
<Columns>
<dx:GridViewCommandColumn ShowSelectButton="True" />
<%--...--%>
</Columns>
</dx:ASPxGridView>
The code sample below adds the Select command button to the command column at runtime:
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e) {
ASPxGridView grid1 = new ASPxGridView();
grid1.ID = "grid1";
Page.Form.Controls.Add(grid1);
...
GridViewCommandColumn commandColumn = new GridViewCommandColumn();
commandColumn.ShowSelectButton = true;
grid1.Columns.Add(commandColumn);
...
}
When the AllowSelectSingleRowOnly property is set to true, multiple row selection is disabled.
When cell merge is enabled, ASPxGridView does not support row selection.
See Also