Skip to main content

GridViewCommandColumnCustomButton Class

Represents a custom command button.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web


public class GridViewCommandColumnCustomButton :

The following members return GridViewCommandColumnCustomButton objects:


Command columns can display custom buttons. These buttons are stored within a column’s GridViewCommandColumn.CustomButtons collection.


Custom buttons are represented by the GridViewCommandColumnCustomButton objects. The button’s text and image are specified by the GridViewCommandColumnButton.Text and GridViewCommandColumnButton.Image properties, respectively. A button’s identifier can be specified by the GridCustomCommandButton.ID property.

To learn more, see How to: Create Custom Command Buttons.


  • Creates a command column with a custom command button in design time.

    <dx:ASPxGridView ID="ASPxGridView1" runat="server" ClientInstanceName="gridView">
        <ClientSideEvents CustomButtonClick="grid_CustomButtonClick" />  
            <dx:GridViewCommandColumn VisibleIndex="0" Width="100px">  
                    <dx:GridViewCommandColumnCustomButton Text="Show New Window" ID="ShowNewWindow">  
  • Creates and initializes a command column with custom command buttons at runtime.

    using DevExpress.Web.ASPxGridView;
    protected void Page_Load(object sender, EventArgs e) {
        if (!IsPostBack) {
            // Creates and initializes a command column.
            GridViewCommandColumn commandCol = new GridViewCommandColumn("Action");
            commandCol.Name = "Action";
        // Creates a custom command button.
        (ASPxGridView1.Columns["Action"] as 
    GridViewCommandColumnCustomButton CreateCustomButton() {
        GridViewCommandColumnCustomButton customBtn = new GridViewCommandColumnCustomButton();
        customBtn.ID = "action1";
        customBtn.Text = "Action1";
        customBtn.Visibility = GridViewCustomButtonVisibility.BrowsableRow;
        return customBtn;
    // Occurs after a command button has been clicked.
    protected void ASPxGridView1_CustomButtonCallback(object sender,
        ASPxGridViewCustomButtonCallbackEventArgs e) {
        if (e.ButtonID == "action1") {
            // ...
See Also