ToolbarItemClickEventArgs Class

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.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.

The code below demonstrates how to handle the ItemClick event.

<div class="card p-2">
    <DxToolbar Title="Operations:" ItemClick="OnItemClick">
        <DxToolbarItem Text="Insert" Name="Insert"></DxToolbarItem>
        <DxToolbarItem Text="Edit" Name="Edit"></DxToolbarItem>
        <DxToolbarItem Text="Delete" Name="Delete"></DxToolbarItem>
    </DxToolbar>
</div>

@ClickedItem

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

    void OnItemClick(ToolbarItemClickEventArgs e) {
        ClickedItem = $"The '{e.ItemName}' toolbar button has been clicked";
    }
}

Toolbar Item Click

Run Demo: Toolbar - Overview

Inheritance

Object
EventArgs
ToolbarItemClickEventArgs
See Also