The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientGridView.CustomButtonClick Event

Occurs when a user clicks a custom command button.

Declaration

CustomButtonClick: ASPxClientEvent<ASPxClientGridViewCustomButtonEventHandler<ASPxClientGridView>>

Event Data

The CustomButtonClick event handler receives an argument of the ASPxClientGridViewCustomButtonEventArgs type. 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.
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