Skip to main content
Tab

FileManagerSettingsToolbar.Items Property

Gets the collection of items displayed in the toolbar and provides indexed access to them.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public FileManagerToolbarItemCollection Items { get; }

Property Value

Type Description
FileManagerToolbarItemCollection

A FileManagerToolbarItemCollection object that is the collection of the toolbar’s items.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to Items
ASP.NET MVC Extensions FileManagerSettings
.SettingsToolbar .Items
ASP.NET Web Forms Controls ASPxFileManager
.SettingsToolbar .Items
RichEditDocumentSelectorSettings
.ToolbarSettings .Items
SpreadsheetDocumentSelectorSettings
.ToolbarSettings .Items

Remarks

The Items property provides access to a toolbar items collection. If the collection is empty, the control populates the toolbar with default items.

Concept

Example

In markup:

<dx:ASPxFileManager ID="FileManager" ClientInstanceName="FileManager" runat="server" />
    <SettingsToolbar>
        <Items>
            <dx:FileManagerToolbarRefreshButton BeginGroup="false" />
            <dx:FileManagerToolbarCustomButton Text="Thumbnails View" CommandName="ChangeView-Thumbnails" 
            GroupName="ViewMode">
                <Image IconID="grid_cards_16x16" />
            </dx:FileManagerToolbarCustomButton>
            ...
        </Items>
    </SettingsToolbar>
</dx:ASPxFileManager>

In code:

ASPxFileManager fm = new ASPxFileManager();
...
FileManagerToolbarRefreshButton refresh = new FileManagerToolbarRefreshButton();
refresh.BeginGroup = false;

FileManagerToolbarCustomButton customButton = new FileManagerToolbarCustomButton();
customButton.Text = "Thumbnails View";
customButton.CommandName = "ChangeView-Thumbnails";
customButton.GroupName = "ViewMode";
customButton.Image.IconID = "grid_cards_16x16";

fm.SettingsToolbar.Items.Add(refresh);
fm.SettingsToolbar.Items.Add(customButton);

MVC:

@Html.DevExpress().FileManager( settings => {
    settings.Name = "fileManager";

    FileManagerToolbarRefreshButton refresh = new FileManagerToolbarRefreshButton();
    refresh.BeginGroup = false;

    FileManagerToolbarCustomButton customButton = new FileManagerToolbarCustomButton();
    customButton.Text = "Thumbnails View";
    customButton.CommandName = "ChangeView-Thumbnails";
    customButton.GroupName = "ViewMode";
    customButton.Image.IconID = "grid_cards_16x16";

    settings.SettingsToolbar.Items.Add(refresh);
    settings.SettingsToolbar.Items.Add(customButton);

    ...
}).BindToFolder(Model).GetHtml()

Online Demo

See Also