ToolbarItemClickEventArgs Class

Provides data for the Toolbar's ItemClick and Toolbar item's Click events.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public class ToolbarItemClickEventArgs :
    EventArgs

Remarks

Use the Click event to specify individual click handlers for Toolbar items. The ItemClick event allows you to specify a common click handler that will be applied to all Toolbar items.

<DxToolbar ItemClick="@OnItemCommonClick">
    <DxToolbarItem Click="@OnInsertItemClick" Text="Insert"></DxToolbarItem>
    <DxToolbarItem Click="@OnEditItemClick" Text="Edit"></DxToolbarItem>
    <DxToolbarItem Click="@OnDeleteItemClick" Text="Delete"></DxToolbarItem>
</DxToolbar>

@AlertText 

@code  {
    public string ClickedItem { get; set; } = "";
    public string AlertText { get; set; } = "";

    void OnInsertItemClick(ToolbarItemClickEventArgs args) {
        ClickedItem = "Insert";
    }
    void OnEditItemClick(ToolbarItemClickEventArgs args) {
        ClickedItem = "Edit";
    }
    void OnDeleteItemClick(ToolbarItemClickEventArgs args) {
        ClickedItem = "Delete";
    }

    void OnItemCommonClick(ToolbarItemClickEventArgs e) {
         AlertText = $"The {ClickedItem} button has been clicked";
    }
}
NOTE

Online Demo: Toolbar - Overview

Inheritance

Object
EventArgs
ToolbarItemClickEventArgs
See Also