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

ASPxGridViewCustomButtonCallbackEventArgs Class

Provides data for the ASPxGridView.CustomButtonCallback event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public class ASPxGridViewCustomButtonCallbackEventArgs :
    ASPxGridCustomButtonCallbackEventArgs
Public Class ASPxGridViewCustomButtonCallbackEventArgs
    Inherits ASPxGridCustomButtonCallbackEventArgs

Examples

This example shows how to create and customize a custom command button.

To create and customize a custom button at design-time, invoke the editor used to manage the GridViewCommandColumn.CustomButtons collection:

CustomButtonCreate

You should specify the button's identifier, text and in which rows the custom button is displayed. In this example, the 'Apply Default Filter' button is created and displayed within the auto filter row.

CustomButtons

To define an action, handle the ASPxGridView.CustomButtonCallback event.

using DevExpress.Web.ASPxGridView;

protected void ASPxGridView1_CustomButtonCallback
(object sender, ASPxGridViewCustomButtonCallbackEventArgs e) {
    if (e.ButtonID != "cbFilter") return;
    ASPxGridView grid = sender as ASPxGridView;
    grid.FilterExpression = "[Title] like '%Sales%'";
}

Inheritance

Object
EventArgs
ASPxGridCustomButtonCallbackEventArgs
ASPxGridViewCustomButtonCallbackEventArgs
See Also