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

ASPxClientGridView.CustomButtonClick Event

Occurs when a user clicks a custom command button.


CustomButtonClick: ASPxClientEvent<ASPxClientGridViewCustomButtonEventHandler<ASPxClientGridView>>

Event Data

The CustomButtonClick event's data class is ASPxClientGridViewCustomButtonEventArgs. The following properties provide information specific to this event:

Property Description
buttonID Gets the value that identifies the custom button.
processOnServer Gets or sets a value that specifies whether the event should be finally processed on the server side. Inherited from ASPxClientProcessingModeEventArgs.
visibleIndex Gets the value that identifies the row whose custom button has been clicked.


Handle the CustomButtonClick event to define an action for a custom button.

The event parameter's ASPxClientGridViewCustomButtonEventArgs.buttonID property allows you to identify the clicked button. Set the ASPxClientProcessingModeEventArgs.processOnServer property to true to raise the ASPxGridView.CustomButtonCallback event that allows you to process a custom button click on the server.


<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">  

Online Example

How to disable the "Edit" button action in some rows of ASPxGridView

See Also