Skip to main content
Tab

FileManagerSettings.EnableMultiSelect Property

Specifies whether to enable multiple file selection in the file manager.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(false)]
public bool EnableMultiSelect { get; set; }

Property Value

Type Default Description
Boolean false

true, to enable multiple file selection; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to EnableMultiSelect
ASPxFileManager
.Settings .EnableMultiSelect

Remarks

Set the EnableMultiSelect property to true to enable multiple file selection in the file manager. The ASPxFileManager.SelectedFiles collection contains selected files. Use the ASPxClientFileManager.GetSelectedItems method to access selected files on the client side.

Keyboard Support

Use the following keys and key combinations to select multiple files in the file manager:

  • Use the ARROW keys to move focus.
  • Use the SPACE key to mark a focused file as either selected or unselected.
  • Hold the CTRL key and focus a file to add to or delete the file from the currently selected files.
  • Hold down the SHIFT key and use the ARROW keys or the mouse to select multiple files in the file manager.

Example

Web Forms:

<dx:ASPxListBox ID="ASPxListBox1" ClientInstanceName="filesList" runat="server" Height="250px" Width="100%" />

Selected count: <strong id="filesCount">0</strong>

<dx:ASPxFileManager ID="ASPxFileManager1" ClientInstanceName="fileManager" runat="server">
     <Settings EnableMultiSelect="true" RootFolder="~/Content/FileManager/Files/Images" InitialFolder="Product icons" ThumbnailFolder="~/Content/FileManager/Thumbnails"/>
     <ClientSideEvents SelectionChanged="fileManager_SelectionChanged" />
</dx:ASPxFileManager> 
function fileManager_SelectionChanged(s, e) {
     filesList.ClearItems();
     var selectedFiles = s.GetSelectedItems();
     for(var i = 0; i < selectedFiles.length; i++) {
          filesList.AddItem(selectedFiles[i].name);
     }
     document.getElementById("filesCount").innerHTML = selectedFiles.length;
}

MVC:

@Html.DevExpress().FileManager(settings =>
{
    settings.Name = "fileManager";
    settings.Settings.InitialFolder = "Product icons";
    settings.Settings.ThumbnailFolder = Url.Content("~/Content/FileManager/Thumbnails");
    settings.Settings.EnableMultiSelect = true;
    ... 
}).BindToFolder(Model).GetHtml()
function fileManager_SelectionChanged(s, e) {
     filesList.ClearItems();
     var selectedFiles = s.GetSelectedItems();
     for(var i = 0; i < selectedFiles.length; i++) {
          filesList.AddItem(selectedFiles[i].name);
     }
     document.getElementById("filesCount").innerHTML = selectedFiles.length;
}

Online Demos

See Also