aspnet-devexpress-dot-web-dot-filemanagersettings-56fb10cb.md
Specifies whether to enable multiple file selection in the file manager.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(false)]
public bool EnableMultiSelect { get; set; }
<DefaultValue(False)>
Public Property EnableMultiSelect As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true, to enable multiple file selection; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to EnableMultiSelect |
|---|---|
| ASPxFileManager |
.Settings .EnableMultiSelect
|
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.
Use the following keys and key combinations to select multiple files in the file manager:
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;
}
See Also