Back to Devexpress

BootstrapToolbar.ItemCommand Event

aspnetbootstrap-devexpress-dot-web-dot-bootstrap-dot-bootstraptoolbar-5473959d.md

latest3.4 KB
Original Source

BootstrapToolbar.ItemCommand Event

Fires when a control contained within a templated toolbar item raises the Command event.

Namespace : DevExpress.Web.Bootstrap

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

NuGet Package : DevExpress.Web.Bootstrap

Declaration

csharp
public event BootstrapToolbarItemCommandEventHandler ItemCommand
vb
Public Event ItemCommand As BootstrapToolbarItemCommandEventHandler

Event Data

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

PropertyDescription
CommandArgumentGets the argument for the command. Inherited from CommandEventArgs.
CommandNameGets the name of the command. Inherited from CommandEventArgs.
CommandSourceGets an object representing the control which forced a postback. Inherited from MenuItemCommandEventArgs.
ItemGets an item object related to the event.

Remarks

The toolbar control allows the contents of its items to be customized through defining templates. A template of an item can be specified by the ASPxMenuBase.ItemTemplate or MenuItem.Template property. A template is a set of HTML elements and controls which constitute a layout for a particular item.

The ItemCommand event is fired when any control contained within a templated item raises the Command event. The ItemCommand event is commonly used when a specific command name is associated with a button control. This allows you to create multiple button controls within different templated items and programmatically determine which button control is clicked.

Write an ItemCommand event handler to perform specific actions each time the Command event is raised by any control contained within any templated item. The ItemCommand event provides a parameter of the BootstrapToolbarItemCommandEventArgs type.

See Also

BootstrapToolbar Class

BootstrapToolbar Members

DevExpress.Web.Bootstrap Namespace