Skip to content

Commit a9c5ade

Browse files
authored
Merge pull request #4027 from syncfusion-content/ES-930548-FM
930548: Added disable the multiselect functionality in ASP core MVC File Manager component.
2 parents 9958d23 + 60273e8 commit a9c5ade

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="control-section">
2+
<div class="sample-container">
3+
<!-- File Manager control declaration -->
4+
@Html.EJS().FileManager("file").AjaxSettings(new Syncfusion.EJ2.FileManager.FileManagerAjaxSettings
5+
{
6+
Url ="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations",
7+
DownloadUrl = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download",
8+
UploadUrl = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload",
9+
GetImageUrl = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage"
10+
}).AllowMultiSelection(false).ShowItemCheckBoxes(false).Render()
11+
<!-- end of File Manager control -->
12+
</div>
13+
</div>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class=" control-section">
2+
<div class="sample-container">
3+
<!-- File Manager control declaration -->
4+
<ejs-filemanager id="file" allowMultiSelection="false" showItemCheckBoxes="false" >
5+
<e-filemanager-ajaxsettings url="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
6+
downloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
7+
uploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
8+
getImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
9+
</e-filemanager-ajaxsettings>
10+
</ejs-filemanager>
11+
<!-- end of File Manager control -->
12+
</div>
13+
</div>
Loading

ej2-asp-core-mvc/file-manager/multiple-selection.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,31 @@ To enable range selection, you need to set the [enableRangeSelection](https://he
7979
The output will look like the image below.
8080

8181
![File Manager rangeselection](./images/rangeselection.png)
82+
83+
## Disable Multi selection
84+
85+
{% if page.publishingplatform == "aspnet-core" %}
86+
87+
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.
88+
89+
{% tabs %}
90+
{% highlight cshtml tabtitle="CSHTML" %}
91+
{% include code-snippet/file-manager/disablemultiselection/tagHelper %}
92+
{% endhighlight %}
93+
{% endtabs %}
94+
95+
{% elsif page.publishingplatform == "aspnet-mvc" %}
96+
97+
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.
98+
99+
{% tabs %}
100+
{% highlight razor tabtitle="CSHTML" %}
101+
{% include code-snippet/file-manager/disablemultiselection/razor %}
102+
{% endhighlight %}
103+
{% endtabs %}
104+
105+
{% endif %}
106+
107+
The output will look like the image below.
108+
109+
![File Manager disable Multiselection](./images/disablemultiselection.png)

0 commit comments

Comments
 (0)