Back to Devexpress

ASPxTreeList.CustomButtonCallback Event

aspnet-devexpress-dot-web-dot-aspxtreelist-dot-aspxtreelist-5d85d56e.md

latest2.2 KB
Original Source

ASPxTreeList.CustomButtonCallback Event

Occurs when a user clicks a custom command button.

Namespace : DevExpress.Web.ASPxTreeList

Assembly : DevExpress.Web.ASPxTreeList.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event TreeListCustomButtonCallbackEventHandler CustomButtonCallback
vb
Public Event CustomButtonCallback As TreeListCustomButtonCallbackEventHandler

Event Data

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

PropertyDescription
ButtonIDSpecifies an ID of the clicked button.
ButtonIndexSpecifies an index of the clicked button.
NodeKeySpecifies the node key to which the clicked button belongs.

Remarks

Use the CustomButtonCallback event to handle a click on a custom command button.

aspx
<ASPxTreeList ID="ASPxTreeList1" onCustomButtonCallback="ASPxTreeList1_CustomButtonCallback">
    ...
</ASPxTreeList>
csharp
protected void ASPxTreeList1_CustomButtonCallback(object sender, TreeListCustomButtonCallbackEventArgs e) {
    if (e.ButtonID == "test_button_name"){
        // your code
    }
}

See Also

ASPxTreeList Class

ASPxTreeList Members

DevExpress.Web.ASPxTreeList Namespace