Class FileManager
Inheritance
Namespace: Syncfusion.EJ2.FileManager
Assembly: Syncfusion.EJ2.dll
Syntax
public class FileManager : EJTagHelper
Constructors
FileManager()
Declaration
public FileManager()
Properties
AjaxSettings
Specifies the AJAX settings of the file manager.
Declaration
public FileManagerAjaxSettings AjaxSettings { get; set; }
Property Value
Type | Description |
---|---|
FileManagerAjaxSettings | The default value is null |
AllowDragAndDrop
Enables or disables drag-and-drop of files.
Declaration
public bool AllowDragAndDrop { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
AllowMultiSelection
Enables or disables the multiple files selection of the file manager.
Declaration
public bool AllowMultiSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
BeforeDelete
This event is triggered before the deletion of a file or folder occurs. It can be utilized to prevent the deletion of specific files or folders. Any actions, such as displaying a spinner for deletion, can be implemented here.
Declaration
public string BeforeDelete { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforeDownload
Triggers before sending the download request to the server.
Declaration
public string BeforeDownload { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforeFolderCreate
This event is triggered before a folder is created. It allows for the restriction of folder creation based on the application's use case.
Declaration
public string BeforeFolderCreate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforeImageLoad
Triggers before sending the getImage request to the server.
Declaration
public string BeforeImageLoad { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforeMove
This event is triggered when a file or folder begins to move from its current path through a copy/cut and paste action.
Declaration
public string BeforeMove { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforePopupClose
Triggers before the dialog is closed.
Declaration
public string BeforePopupClose { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforePopupOpen
Triggers before the dialog is opened.
Declaration
public string BeforePopupOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforeRename
This event is triggered when a file or folder is about to be renamed. It allows for the restriction of the rename action for specific folders or files by utilizing the cancel option.
Declaration
public string BeforeRename { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforeSend
Triggers before sending the AJAX request to the server.
Declaration
public string BeforeSend { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ContextMenuSettings
Specifies the context menu settings of the file manager.
Declaration
public FileManagerContextMenuSettings ContextMenuSettings { get; set; }
Property Value
Type | Description |
---|---|
FileManagerContextMenuSettings | The default value is null |
Created
Triggers when the file manager component is created.
Declaration
public string Created { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
CssClass
Specifies the root CSS class of the file manager that allows you to customize the appearance by overriding the styles.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Delete
This event is triggered after the file or folder is deleted successfully. The deleted file or folder details can be retrieved here. Additionally, custom elements' visibility can be managed here based on the application's use case.
Declaration
public string Delete { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Destroyed
Triggers when the file manager component is destroyed.
Declaration
public string Destroyed { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
DetailsViewSettings
Specifies the details view settings of the file manager.
Declaration
public FileManagerDetailsViewSettings DetailsViewSettings { get; set; }
Property Value
Type | Description |
---|---|
FileManagerDetailsViewSettings | The default value is null |
EnableHtmlSanitizer
Defines whether to allow the cross-scripting site or not.
Declaration
public bool EnableHtmlSanitizer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
EnablePersistence
Enables or disables persisting component's state between page reloads. If enabled, the following APIs will persist:
view
: Represents the previous view of the file manager.path
: Represents the previous path of the file manager.selectedItems
: Represents the previous selected items in the file manager.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableRangeSelection
Gets or sets a value that indicates whether the File Manager allows multiple items selection with mouse dragging. Set this property to true to allow users to select multiple items with mouse drag as like file explorer. Hover over the files or folders and drag the mouse to select the required items.
Declaration
public bool EnableRangeSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableVirtualization
Gets or sets a value that enables/disables the virtualization feature of the File Manager. When enabled, the File Manager will only load a subset of files and folders based on the size of the view port, with the rest being loaded dynamically as the user scrolls vertically through the list. This can improve performance when dealing with a large number of files and folders, as it reduces the initial load time and memory usage.
Declaration
public bool EnableVirtualization { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
Failure
Triggers when the AJAX request is failed.
Declaration
public string Failure { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileDragging
Triggers while dragging the file/folder.
Declaration
public string FileDragging { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileDragStart
Triggers when the file/folder dragging is started.
Declaration
public string FileDragStart { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileDragStop
Triggers when the file/folder is about to be dropped at the target.
Declaration
public string FileDragStop { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileDropped
Triggers when the file/folder is dropped.
Declaration
public string FileDropped { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileLoad
Triggers before the file/folder is rendered.
Declaration
public string FileLoad { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileOpen
Triggers before the file/folder is opened.
Declaration
public string FileOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileSelect
Triggers when the file/folder is selected/unselected.
Declaration
public string FileSelect { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileSelection
Triggers before the file/folder is selected.
Declaration
public string FileSelection { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
FileSystemData
Specifies the array of data to populate folders/files in the File Manager. The mandatory fields to be included in the JSON data are defined in fileData interface. This interface can be extended to add additional fields as required.
Declaration
public object FileSystemData { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
FolderCreate
This event is triggered when a folder is successfully created. It provides an opportunity to retrieve details about the newly created folder.
Declaration
public string FolderCreate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Height
Specifies the height of the file manager.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "400px" |
HtmlAttributes
Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.
Declaration
public object HtmlAttributes { get; set; }
Property Value
Type |
---|
System.Object |
Locale
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
MenuClick
Triggers when the context menu item is clicked.
Declaration
public string MenuClick { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
MenuClose
Triggers before the context menu is closed.
Declaration
public string MenuClose { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
MenuOpen
Triggers before the context menu is opened.
Declaration
public string MenuOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Move
This event is triggered when a file or folder is pasted into the destination path.
Declaration
public string Move { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
NavigationPaneSettings
Specifies the navigationpane settings of the file manager.
Declaration
public FileManagerNavigationPaneSettings NavigationPaneSettings { get; set; }
Property Value
Type | Description |
---|---|
FileManagerNavigationPaneSettings | The default value is null |
Path
Specifies the current path of the file manager.
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "/" |
PopupClose
Triggers when the dialog is closed.
Declaration
public string PopupClose { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
PopupOpen
Triggers when the dialog is opened.
Declaration
public string PopupOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
PopupTarget
Declaration
public string PopupTarget { get; set; }
Property Value
Type |
---|
System.String |
Rename
This event is triggered when a file or folder is successfully renamed. It provides an opportunity to fetch details about the renamed file.
Declaration
public string Rename { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
RootAliasName
Specifies the root folder alias name in file manager
Declaration
public string RootAliasName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Search
This event is triggered when a search action occurs in the search bar of the File Manager component. It triggers each character entered in the input during the search process.
Declaration
public string Search { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
SearchSettings
Specifies the search settings of the file manager.
Declaration
public FileManagerSearchSettings SearchSettings { get; set; }
Property Value
Type | Description |
---|---|
FileManagerSearchSettings | The default value is null |
SelectedItems
Specifies the selected folders and files name of the file manager.
Declaration
public string[] SelectedItems { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | The default value is null |
ShowFileExtension
Shows or hides the file extension in file manager.
Declaration
public bool ShowFileExtension { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
ShowHiddenItems
Shows or hides the files and folders that are marked as hidden.
Declaration
public bool ShowHiddenItems { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
ShowItemCheckBoxes
Gets or sets a boolean value that determines whether to display checkboxes in the file manager. If enabled, checkboxes are shown for files or folders on hover.
Declaration
public bool ShowItemCheckBoxes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
ShowThumbnail
Shows or hides the thumbnail images in largeicons view.
Declaration
public bool ShowThumbnail { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
SortBy
Specifies the field name being used as the sorting criteria to sort the files of the file manager component.
Declaration
public string SortBy { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "name" |
SortComparer
Defines the custom sorting function.
The sort comparer function has the same functionality like
Array.sort
sort comparer.
This can be used to customize the default sorting functionalities with required comparison values.
Declaration
public string SortComparer { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
SortOrder
Specifies a value that indicates whether the folders and files are sorted in the ascending or descending order,
or they are not sorted at all. The available types of sort orders are,
None
- Indicates that the folders and files are not sorted.
Ascending
- Indicates that the folders and files are sorted in the ascending order.
Descending
- Indicates that the folders and files are sorted in the descending order.
Declaration
public SortOrder SortOrder { get; set; }
Property Value
Type | Description |
---|---|
SortOrder | The default value is SortOrder.Ascending |
Success
Triggers when the AJAX request is success.
Declaration
public string Success { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ToolbarClick
Triggers when the toolbar item is clicked.
Declaration
public string ToolbarClick { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ToolbarCreate
Triggers before creating the toolbar.
Declaration
public string ToolbarCreate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ToolbarItems
An array of items that are used to configure File Manager toolbar items.
Declaration
public List<FileManagerToolbarItem> ToolbarItems { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Syncfusion.EJ2.FileManager.FileManagerToolbarItem> | The default value is null |
ToolbarSettings
Specifies the group of items aligned horizontally in the toolbar.
Declaration
public FileManagerToolbarSettings ToolbarSettings { get; set; }
Property Value
Type | Description |
---|---|
FileManagerToolbarSettings | The default value is null |
UploadListCreate
Triggers before rendering each file item in upload dialog box.
Declaration
public string UploadListCreate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
UploadSettings
Specifies the upload settings for the file manager.
Declaration
public FileManagerUploadSettings UploadSettings { get; set; }
Property Value
Type | Description |
---|---|
FileManagerUploadSettings | The default value is null |
View
Specifies the initial view of the file manager.
With the help of this property, initial view can be changed to details or largeicons view. The available views are:
LargeIcons
Details
Declaration
public ViewType View { get; set; }
Property Value
Type | Description |
---|---|
ViewType | The default value is ViewType.LargeIcons |
Width
Specifies the width of the file manager.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "100%" |