diff --git a/ej2-asp-core-mvc/code-snippet/file-manager/disablemultiselection/razor b/ej2-asp-core-mvc/code-snippet/file-manager/disablemultiselection/razor new file mode 100644 index 0000000000..35e24ffe2c --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/file-manager/disablemultiselection/razor @@ -0,0 +1,13 @@ +
+
+ + @Html.EJS().FileManager("file").AjaxSettings(new Syncfusion.EJ2.FileManager.FileManagerAjaxSettings + { + Url ="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations", + DownloadUrl = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download", + UploadUrl = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload", + GetImageUrl = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage" + }).AllowMultiSelection(false).ShowItemCheckBoxes(false).Render() + +
+
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/file-manager/disablemultiselection/tagHelper b/ej2-asp-core-mvc/code-snippet/file-manager/disablemultiselection/tagHelper new file mode 100644 index 0000000000..0e97e16c2b --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/file-manager/disablemultiselection/tagHelper @@ -0,0 +1,13 @@ +
+
+ + + + + + +
+
\ No newline at end of file diff --git a/ej2-asp-core-mvc/file-manager/images/disablemultiselection.png b/ej2-asp-core-mvc/file-manager/images/disablemultiselection.png new file mode 100644 index 0000000000..24449c9853 Binary files /dev/null and b/ej2-asp-core-mvc/file-manager/images/disablemultiselection.png differ diff --git a/ej2-asp-core-mvc/file-manager/multiple-selection.md b/ej2-asp-core-mvc/file-manager/multiple-selection.md index 0af634867b..5b4d5be6e1 100644 --- a/ej2-asp-core-mvc/file-manager/multiple-selection.md +++ b/ej2-asp-core-mvc/file-manager/multiple-selection.md @@ -79,3 +79,31 @@ To enable range selection, you need to set the [enableRangeSelection](https://he The output will look like the image below. ![File Manager rangeselection](./images/rangeselection.png) + +## Disable Multi selection + +{% if page.publishingplatform == "aspnet-core" %} + +Setting the [`allowMultiSelection`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.filemanager.filemanager.html#Syncfusion_EJ2_FileManager_FileManager_AllowMultiSelection) property to false will prevent you from selecting multiple files or folders with standard selection methods. However, you can still select multiple items if checkboxes are visible. To fully disable all multi-selection capabilities, you must also set the [`showItemCheckBoxes`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.filemanager.filemanager.html#Syncfusion_EJ2_FileManager_FileManager_ShowItemCheckBoxes) property to false. This ensures that you cannot use checkboxes for multiple selections. + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/file-manager/disablemultiselection/tagHelper %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +Setting the [`allowMultiSelection`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.filemanager.filemanager.html#Syncfusion_EJ2_FileManager_FileManager_AllowMultiSelection) property to false will prevent you from selecting multiple files or folders with standard selection methods. However, you can still select multiple items if checkboxes are visible. To fully disable all multi-selection capabilities, you must also set the [`showItemCheckBoxes`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.filemanager.filemanager.html#Syncfusion_EJ2_FileManager_FileManager_ShowItemCheckBoxes) property to false. This ensures that you cannot use checkboxes for multiple selections. + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/file-manager/disablemultiselection/razor %} +{% endhighlight %} +{% endtabs %} + +{% endif %} + +The output will look like the image below. + +![File Manager disable Multiselection](./images/disablemultiselection.png) \ No newline at end of file