Skip to main content
Tab

FileManagerToolbarCustomButton.GroupName Property

Gets or sets the name of a logical check group to which the toolbar button belongs.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("")]
public string GroupName { get; set; }

Property Value

Type Default Description
String String.Empty

A String value that specifies the group name.

Remarks

Use the GroupName property to specify a logical check group for a toolbar button. Use the FileManagerToolbarCustomButton.Checked property to define a button’s check state.

A toolbar button can function as a check box if the item belongs to a logical group (an item’s GroupName property). Set an item(s) GroupName property to the same value to arrange the item(s) into a logical group.

The file manager displays toolbar items as radio buttons if you arrange these items into a group -an user can check only one menu item in a group at one time.

Note

A menu item’s client ASPxClientMenuItem.GetChecked and ASPxClientMenuItem.SetChecked methods are in effect only if the item’s GroupName property is defined.

Concept

Toolbar

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