All docs
V20.2
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
A newer version of this page is available. Switch to the current version.

GanttToolbarSettings Class

Contains toolbar settings.

Namespace: DevExpress.Web.ASPxGantt

Assembly: DevExpress.Web.ASPxGantt.v20.2.dll

Declaration

public class GanttToolbarSettings :
    GanttSettingsBase

The following members accept/return GanttToolbarSettings objects:

Library Related API Members
ASP.NET Web Forms Controls ASPxGantt.SettingsToolbar
ASP.NET MVC Extensions GanttSettings.SettingsToolbar

Remarks

The ASPxGantt control allows you to display the most frequently used commands in the built-in toolbar.

Run Demo: (Web Forms) Gantt Toolbar

Run Demo: (MVC) Gantt Toolbar

The toolbar has a set of predefined items and supports custom items. Use the Items collection to access toolbar items.

Available toolbar item types:

Toolbar Item Type

Description

GanttAddTaskToolbarItem

A toolbar item that adds a task.

GanttCollapseAllToolbarItem

A toolbar item that collapses all tasks.

GanttExpandAllToolbarItem

A toolbar item that expands all tasks.

GanttFullScreenToolbarItem

A toolbar item that switches the control to full screen mode.

GanttRedoToolbarItem

A toolbar item that repeats the undone action.

GanttRemoveTaskToolbarItem

A toolbar item that removes a task.

GanttUndoToolbarItem

A toolbar item that reverses an action.

GanttZoomInToolbarItem

A toolbar item that zooms in.

GanttCustomToolbarItem

A custom toolbar item.

GanttZoomOutToolbarItem

A toolbar item that zooms out.

Create a Standard Toolbar Item

Create any of supported standard toolbar items, specify its Text property, and add this toolbar item to the Items collection.

<dx:ASPxGantt ID="Gantt" runat="server"...>
    ...
    <SettingsToolbar>
        <Items>
            <dx:GanttZoomInToolbarItem Text="Zoom In" />
            <dx:GanttZoomOutToolbarItem Text="Zoom Out" />
        </Items>
    </SettingsToolbar>
</dx:ASPxGantt>

Create a Custom Toolbar Item

Create a GanttCustomToolbarItem object, specify its Text and CommandName properties, and add this toolbar item to the Items collection. To handle the toolbar item click, handle the CustomCommand event.

<dx:ASPxGantt ID="Gantt">
    <SettingsToolbar>
        <Items>
            <dx:GanttCustomToolbarItem Text="About" CommandName="About" />
        </Items>
    </SettingsToolbar>
    <ClientSideEvents CustomCommand="CustomCommand" />
    ...
</dx:ASPxGantt>
function CustomCommand(s, e) {
    if (e.commandName == "About")
        alert('Sample message');
}

Show and Hide Toolbar

Set the Visible property to true to hide the toolbar.

<dx:ASPxGantt ID="Gantt" runat="server"...>
    ...
    <SettingsToolbar Visible="false" />
</dx:ASPxGantt>

Change Toolbar Alignment

Set the Alignment property to one of the GanttToolbarAlignment enumeration values to change the toolbar alignment.

<dx:ASPxGantt ID="Gantt" runat="server"...>
    ...
    <SettingsToolbar Alignment="Right" />
</dx:ASPxGantt>

Implements

Inheritance

See Also