Back to Devexpress

BootstrapToolbar.Items Property

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

latest3.3 KB
Original Source

BootstrapToolbar.Items Property

Provides access to a collection of toolbar items.

Namespace : DevExpress.Web.Bootstrap

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

NuGet Package : DevExpress.Web.Bootstrap

Declaration

csharp
[PersistenceMode(PersistenceMode.InnerProperty)]
public BootstrapToolbarItemCollection Items { get; }
vb
<PersistenceMode(PersistenceMode.InnerProperty)>
Public ReadOnly Property Items As BootstrapToolbarItemCollection

Property Value

TypeDescription
BootstrapToolbarItemCollection

A BootstrapToolbarItemCollection object representing the collection of the toolbar’s items.

|

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.

  1. Initialize a new instance of the BootstrapToolbar class.
  2. Add required toolbar items (BootstrapToolbarItem objects) to the BootstrapToolbar.Items collection.
  3. Additional members:

The image below shows the result:

javascript
function onDefaultToolbarItemClick(s, e) {
    dxbsDemo.showToast("The button '" + e.item.name + "' has been clicked.");
}
aspx
<dx:BootstrapToolbar runat="server">
    <Items>
        <dx:BootstrapToolbarItem Name="Copy" IconCssClass="fa fa-copy" />
        <dx:BootstrapToolbarItem Name="Paste" IconCssClass="fa fa-paste" />
        <dx:BootstrapToolbarItem Name="Item1" Text="Item" />
        <dx:BootstrapToolbarItem Name="Link" Text="Link" NavigateUrl="#DefaultToolbar" />
        <dx:BootstrapToolbarItem Name="Left" BeginGroup="true" IconCssClass="fa fa-align-left" />
        <dx:BootstrapToolbarItem Name="Center" IconCssClass="fa fa-align-center" />
        <dx:BootstrapToolbarItem Name="Right" IconCssClass="fa fa-align-right" />
    </Items>
    <ClientSideEvents ItemClick="onDefaultToolbarItemClick" />
</dx:BootstrapToolbar>

See Also

Default ToolbarOnline demo:

Toolbar

BootstrapToolbar Class

BootstrapToolbar Members

DevExpress.Web.Bootstrap Namespace