A newer version of this page is available. Switch to the current version.

GridViewCommandColumn.CustomButtons Property

Gets the collection of custom buttons.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll


public GridViewCommandColumnCustomButtonCollection CustomButtons { get; }
Public ReadOnly Property CustomButtons As GridViewCommandColumnCustomButtonCollection

Property Value

Type Default Description


A GridViewCommandColumnCustomButtonCollection object which represents the collection of custom buttons.


Command columns can display custom buttons. You can create your own buttons, and define custom actions for them by handling the ASPxGridView.CustomButtonCallback event.



<dx:ASPxGridView ID="grid" runat="server" DataSourceID="DemoDataSource1" KeyFieldName="EmployeeID" 
AutoGenerateColumns="False" OnCustomButtonCallback="grid_CustomButtonCallback" ...>
        <dx:GridViewCommandColumn ShowNewButton="true" ShowEditButton="true" VisibleIndex="0" ButtonRenderMode="Image">
                <dx:GridViewCommandColumnCustomButton ID="Clone">
                    <Image ToolTip="Clone Record" Url="Images/clone.png" />


using System;
using System.Collections.Generic;
using System.Web.Mvc;
using MyProject.Models;
namespace MyProject.Controllers
    public class HomeController : Controller
        // ... 
        // "gridItems()" returns a list of records displayed within a GridView. 
        // Handle the custom callback. 
        public ActionResult CustomButtonClick(string clickedButton)
            // Show a different number of records depending on the ID of the custom button that was clicked. 
            if (clickedButton == "First10") { 
                return PartialView("_GridViewPartial", gridItems().GetRange(0, 10)); 
            else {
                return PartialView("_GridViewPartial", gridItems().GetRange(0, 5) );

Online Demo

ASPxGridView - Custom Command Buttons

See Also