Skip to main content

ToolbarItemClickEventArgs Class

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

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 following code snippet handles 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

See Also