Back to Devexpress

FileManagerSettingsEditing.AllowDownload Property

aspnet-devexpress-dot-web-dot-filemanagersettingsediting.md

latest5.2 KB
Original Source

FileManagerSettingsEditing.AllowDownload Property

Gets or sets a value specifying whether files can be downloaded.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(false)]
public virtual bool AllowDownload { get; set; }
vb
<DefaultValue(False)>
Public Overridable Property AllowDownload As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true, if file downloading is allowed; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to AllowDownload
ASP.NET MVC ExtensionsFileManagerSettings

.SettingsEditing .AllowDownload

| | ASP.NET Web Forms Controls | ASPxFileManager |

.SettingsEditing .AllowDownload

|

Remarks

Use the AllowDownload property to control whether files can be downloaded.

An end-user can download a file manager file using the toolbar download button or context menu Download item, whose availability depends on the AllowDownload property value.

Toolbar Download Button

The download button is displayed in the toolbox if the FileManagerSettingsToolbar.Items collection contains an object of the FileManagerToolbarDownloadButton type. In this case, the AllowDownload property specifies the button’s availability.

When the FileManagerSettingsToolbar.Items collection is empty, the AllowDownload property specifies the download button visibility.

Context Menu Download Item

The download item is displayed in the context menu if the FileManagerSettingsContextMenu.Items collection contains an object of the FileManagerToolbarDownloadButton type, or if the FileManagerSettingsContextMenu.Items collection is empty. The AllowDownload property specifies the item availability.

Example

Web Forms (in markup):

aspx
<dx:ASPxFileManager ID="fileManager" runat="server" >
    <SettingsEditing AllowCreate="true" AllowDelete="true" AllowMove="true" AllowRename="true" 
    AllowCopy="true" AllowDownload="true" />    
    ...
</dx:ASPxFileManager>

Web Forms (in code):

csharp
ASPxFileManager fm = new ASPxFileManager();
...
fm.SettingsEditing.AllowCreate = true;
fm.SettingsEditing.AllowDelete = true;
fm.SettingsEditing.AllowMove = true;
fm.SettingsEditing.AllowRename = true;
fm.SettingsEditing.AllowCopy = true;
fm.SettingsEditing.AllowDownload = true;

MVC:

csharp
@Html.DevExpress().FileManager( settings => {
    settings.Name = "fileManager";
    settings.SettingsEditing.AllowCreate = true;
    settings.SettingsEditing.AllowDelete = true;
    settings.SettingsEditing.AllowMove = true;
    settings.SettingsEditing.AllowRename = true;
    settings.SettingsEditing.AllowCopy = true;
    settings.SettingsEditing.AllowDownload = true;
    ...
}).BindToFolder(Model).GetHtml()

Online Demo

See Also

Items

Download Button

File Manager Toolbar

Context Menu

FileManagerToolbarDownloadButton

File Manager

FileManagerSettingsEditing Class

FileManagerSettingsEditing Members

DevExpress.Web Namespace