BootstrapToolbar.Items Property
In This Article
Provides access to a collection of toolbar items.
Namespace: DevExpress.Web.Bootstrap
Assembly: DevExpress.Web.Bootstrap.v24.2.dll
NuGet Package: DevExpress.Web.Bootstrap
#Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public BootstrapToolbarItemCollection Items { get; }
#Property Value
Type | Description |
---|---|
Bootstrap |
A Bootstrap |
#Remarks
The Items property provides access to a collection that contains all the items of the current toolbar. This collection provides the standard means to manipulate (add or remove) items within a toolbar.
#Example
This example demonstrates the basic functionality of the Toolbar control.
- Initialize a new instance of the BootstrapToolbar class.
- Add required toolbar items (BootstrapToolbarItem objects) to the
BootstrapToolbar.Items
collection. Additional members:
- BootstrapToolbar.ItemClick occurs when an end-user clicks a toolbar button.
- MenuItem.Name specifies a button’s name, which identifies the item in the toolbar’s Items collection.
- MenuItem.Text specifies a button’s display text.
- MenuItem.BeginGroup – if set to true, the button becomes the first button in a new button group.
- BootstrapToolbarItemBase.IconCssClass specifies the CSS class of an icon displayed by a toolbar item.
- MenuItem.NavigateUrl specifies a button’s navigation location. When this property is specified, the button is rendered as a hyperlink.
The image below shows the result:
function onDefaultToolbarItemClick(s, e) {
dxbsDemo.showToast("The button '" + e.item.name + "' has been clicked.");
}
See Also