ASPxClientGridView.CustomButtonClick Event
Occurs when a user clicks a custom command button.
Declaration
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 | Specifies whether or not to process the event on the server. Inherited from ASPxClientProcessingModeEventArgs. |
visibleIndex | Gets the value that identifies the row whose custom button has been clicked. |
Remarks
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.
Example
<dx:ASPxGridView ID="ASPxGridView1" runat="server" ClientInstanceName="gridView">
<ClientSideEvents CustomButtonClick="grid_CustomButtonClick" />
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0" Width="100px">
<CustomButtons>
<dx:GridViewCommandColumnCustomButton Text="Show New Window" ID="ShowNewWindow">
</dx:GridViewCommandColumnCustomButton>
</CustomButtons>
</dx:GridViewCommandColumn>
...
</Columns>
</dx:ASPxGridView>
Online Example
How to disable the “Edit” button action in some rows of ASPxGridView
See Also