Back to Devexpress

GridViewCommandColumn.ShowSelectButton Property

aspnet-devexpress-dot-web-dot-gridviewcommandcolumn-38955bae.md

latest3.4 KB
Original Source

GridViewCommandColumn.ShowSelectButton Property

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

Declaration

csharp
[DefaultValue(false)]
public bool ShowSelectButton { get; set; }
vb
<DefaultValue(False)>
Public Property ShowSelectButton As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the Select button is visible; otherwise, false.

|

Remarks

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).

aspx
<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:

csharp
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);
    ...
}

Limitations

See Also

GridViewCommandColumn Class

GridViewCommandColumn Members

DevExpress.Web Namespace