aspnet-devexpress-dot-web-dot-aspxtreelist-dot-aspxtreelist-5d85d56e.md
Occurs when a user clicks a custom command button.
Namespace : DevExpress.Web.ASPxTreeList
Assembly : DevExpress.Web.ASPxTreeList.v25.2.dll
NuGet Package : DevExpress.Web
public event TreeListCustomButtonCallbackEventHandler CustomButtonCallback
Public Event CustomButtonCallback As TreeListCustomButtonCallbackEventHandler
The CustomButtonCallback event's data class is TreeListCustomButtonCallbackEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| ButtonID | Specifies an ID of the clicked button. |
| ButtonIndex | Specifies an index of the clicked button. |
| NodeKey | Specifies the node key to which the clicked button belongs. |
Use the CustomButtonCallback event to handle a click on a custom command button.
<ASPxTreeList ID="ASPxTreeList1" onCustomButtonCallback="ASPxTreeList1_CustomButtonCallback">
...
</ASPxTreeList>
protected void ASPxTreeList1_CustomButtonCallback(object sender, TreeListCustomButtonCallbackEventArgs e) {
if (e.ButtonID == "test_button_name"){
// your code
}
}
See Also