Class SfFileManager<TValue>
This class hold constants of file manager.
Inherited Members
Namespace: Syncfusion.Blazor.FileManager
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfFileManager<TValue> : SfBaseComponent, IFileManager
Type Parameters
Name | Description |
---|---|
TValue | The generic type parameter. |
Examples
A Blazor FileManager component with file operations.
<SfFileManager TValue="FileManagerDirectoryContent">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
Constructors
SfFileManager()
Declaration
public SfFileManager()
Properties
AllowDragAndDrop
Gets or sets a value that indicates whether the SfFileManager<TValue> allows drag and drop of files.
Declaration
public bool AllowDragAndDrop { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Set this property to true to allow users to drag and drop files into the FileManager. When the property is set to true, users can drag and drop files from their local machine or from another location in the FileManager.
By default, the drag and drop operation only supports single file upload.
To enable directory upload, set the 'DirectoryUpload' property in the 'UploadSettings' property to true.
When enabled, users can drag and drop a folder containing multiple files, which will upload all of the files within the folder to the FileManager.
AllowMultiSelection
Gets or sets a value that indicates whether multi-selection of files or folders is enabled in the SfFileManager<TValue> component.
Declaration
public bool AllowMultiSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When multi-selection is enabled, users can select multiple files or folders in the SfFileManager<TValue> component by holding down the CTRL key and clicking on the files or folders they want to select. Consecutive files or folders can be selected by holding down the SHIFT key and clicking on the initial and final files or folders of the range to be selected.
AllowPaging
Gets or sets a value that indicates whether paging is enabled for the SfFileManager<TValue> component.
Declaration
public bool AllowPaging { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When set to true
, pagination is enabled, and the File Manager will load only the number of files and folders specified in the PageSize, which can significantly improve the performance when dealing with large datasets.
Further page settings can be configured through FileManagerPageSettings.
CssClass
Gets or sets one or more CSS classes that can be used to customize the appearance of the SfFileManager<TValue> component.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that contains one or more CSS class names separated by spaces. The default value is |
Remarks
When one or more CSS classes are applied to the CssClass property, the associated styles will be used to modify the appearance of the SfFileManager<TValue> component's element.
Examples
<SfFileManager TValue="FileManagerDirectoryContent" CssClass="e-custom e-files">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
EnableHtmlSanitizer
Specifies whether to allow rendering of untrusted HTML values in the SfFileManager<TValue> component.
Declaration
public bool EnableHtmlSanitizer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
While enable this property, it sanitize suspected untrusted strings and script, and update in the SfFileManager<TValue> component
EnablePersistence
Gets or sets whether to persist the state of the SfFileManager<TValue> component between page reloads.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
If enabled, the following FileManager properties will persist:
- The previous view of the FileManager.
- The previous path of the FileManager.
- The previous selected items in the FileManager.
EnableRangeSelection
Gets or sets a value that indicates whether theSfFileManager<TValue> allows multiple items selection with mouse dragging.
Declaration
public bool EnableRangeSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
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.
EnableRtl
Gets or sets whether the right to left direction is enabled for the SfFileManager<TValue> component.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When set to true
, the layout of the SfFileManager<TValue> component will be rendered from right to left.
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 |
|
Height
Gets or sets the height value of the SfFileManager<TValue> component.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value that accepts different formats such as px, percentage, pt, rem, or em. The default value is |
Remarks
Use this property to set the height of the component based on your application layout.
ID
Get or sets the ID value of the SfFileManager<TValue> element.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Path
Gets or sets the current path of the SfFileManager<TValue> component.
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
Remarks
The component updates its path property for each file operation, such as opening a folder or uploading a file. Use this property to retrieve or set the current path of the FileManager component.
Examples
<SfFileManager TValue="FileManagerDirectoryContent" Path="/Pictures/Food/">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
PopupTarget
Gets or sets the target element in which the FileManager's dialog will be displayed. The default value is null, which refers to the FileManager element itself.
Declaration
public string PopupTarget { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value representing the CSS selector for the target element. |
Remarks
Use this property to specify a different element to contain the FileManager's dialog, for example if you need to place the dialog within a specific container element. The target element should have the appropriate attributes and styles to properly display the dialog. If the target element is not found, the dialog will be displayed within the FileManager element.
Examples
<SfFileManager TValue="FileManagerDirectoryContent" PopupTarget=".container">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
RootAliasName
Gets or sets the alias name for the root folder in the SfFileManager<TValue> component.
Declaration
public string RootAliasName { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value representing the alias name for the root folder. |
Remarks
Use this property to specify a custom alias name for the root folder in the FileManager component. By default, the root folder is displayed as the parent folder. If a custom alias name is specified, the FileManager will display the root folder with the specified name instead.
Examples
<SfFileManager TValue="FileManagerDirectoryContent" RootAliasName="RootFolder">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
SelectedItems
Gets or sets the selected folders and files name of the SfFileManager<TValue> component.
Declaration
public string[] SelectedItems { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | An array of strings containing the names of the selected folders and files in the FileManager. If no items are selected, the property returns an empty array. |
Examples
<SfFileManager TValue="FileManagerDirectoryContent" SelectedItems="@selectedItems">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
@code{
public string[] selectedItems = new string[] { "Documents", "Music" };
}
SelectedItemsChanged
Gets or sets an event callback that is raised when the selected items in the SfFileManager<TValue> component are changed.
Declaration
public EventCallback<string[]> SelectedItemsChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.String[]> | An event callback that is raised when the selected items are changed. |
Remarks
Use this event callback to capture the selected items and perform any necessary actions. The event callback receives an array of strings that contains the names of the selected folders and files.
ShowFileExtension
Gets or sets a value which determines whether to show or hide the file extension in the SfFileManager<TValue> component.
Declaration
public bool ShowFileExtension { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
A boolean value that indicates whether the file extension should be shown.
ShowHiddenItems
Gets or sets a value which determines whether to show or hide the files and folders that are marked as hidden.
Declaration
public bool ShowHiddenItems { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
A boolean value that indicates whether the hidden files or folders should be shown.
ShowItemCheckBoxes
Gets or sets a boolean value that determines whether to display checkboxes in the SfFileManager<TValue> component.
Declaration
public bool ShowItemCheckBoxes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When this property is enabled, checkboxes are shown for files or folders on hover in the SfFileManager<TValue> component which allows selection of multiple files or folders.
ShowThumbnail
Gets or sets a value which determines whether to shows or hides the thumbnail images in large icons view.
Declaration
public bool ShowThumbnail { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
A boolean value that indicates whether the thumbnail images should be shown in large icons view.
ShowTooltip
Gets or sets a value that indicates whether to show tooltips for various UI elements in the SfFileManager<TValue> component.
Declaration
public bool ShowTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Tooltips will be displayed for toolbar items, navigation pane, and folders when this property is enabled.
SortBy
Gets or sets the field name being used as the sorting criteria to sort the files of the SfFileManager<TValue> component.
Declaration
public string SortBy { get; set; }
Property Value
Type | Description |
---|---|
System.String | A field name used to sort the folders and files in the FileManager component. The default value is |
Remarks
The SortOrder property indicates whether to sort the folders and files in ascending or descending order.
Examples
<SfFileManager TValue="FileManagerDirectoryContent" SortOrder="SortOrder.Descending" SortBy="Size">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
SortComparer
Gets or sets the custom sort comparer object to implement own sorting logic.
Declaration
public IComparer<object> SortComparer { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IComparer<System.Object> | Name of sort comparer object to be executed. The default value is null. |
Remarks
Custom sort comparer class should be implemented in the interface IComparer. Custom sort comparer can be used to modify the default sorting logic for both views in File Manager.
SortOrder
Gets or sets the sort order for the files and folders in the SfFileManager<TValue> component.
Declaration
public SortOrder SortOrder { get; set; }
Property Value
Type | Description |
---|---|
SortOrder | A value of the SortOrder enumeration. |
Remarks
The available options for the sort order are:
- None: The folders and files are not sorted.
- Ascending: The folders and files are sorted in ascending order.
- Descending: The folders and files are sorted in descending order.
Examples
<SfFileManager TValue="FileManagerDirectoryContent" SortOrder="SortOrder.Descending">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
View
Gets or sets the initial view of the SfFileManager<TValue> component.
The available views are LargeIcons
and Details
.
Declaration
public ViewType View { get; set; }
Property Value
Type | Description |
---|---|
ViewType | A value of the ViewType enumeration. |
Remarks
Use this property to specify whether the FileManager should display files and folders in a large icon view or a detailed view. The available options for the view are:
- LargeIcons: The files and folders are displayed as large icons with minimal detail.
- Details: The files and folders are displayed in a detailed list.
Examples
<SfFileManager TValue="FileManagerDirectoryContent" View="ViewType.Details">
<FileManagerAjaxSettings Url = "https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
ViewChanged
Gets or sets the event callback that will be invoked when the layout view of the FileManager is changed
Declaration
public EventCallback<ViewType> ViewChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ViewType> | An event callback that will be invoked when the layout view of the FileManager is changed. |
Remarks
The layout change can be detected here and required actions can be performed.
Width
Gets or sets the width of the SfFileManager<TValue> component.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value that represents the width of the FileManager.
The default width is set to |
Remarks
The width value can be represented as percentage, such as "100%", or a pixel value, such as "500px".
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
ChangeMobileMultiSelection(String)
Performs mobile multiselection opertaion.
Declaration
public Task ChangeMobileMultiSelection(string dataId)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataId | Specifies the data id parameter. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
ClearSelectionAsync()
Deselects the currently selected folders and files in the current path in the SfFileManager<TValue> component.
Declaration
public Task ClearSelectionAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
CreateFolderAsync(String)
Programmatically creates a new folder in the SfFileManager<TValue> component.
Declaration
public Task CreateFolderAsync(string folderName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | folderName | Specifies the folder name to create a new folder. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
DeleteFilesAsync(String[])
Delete the folders or files from the given unique identifiers programmatically in the SfFileManager<TValue> component.
Declaration
public Task DeleteFilesAsync(string[] deleteFiles = null)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | deleteFiles | Specifies the file name parameter to be deleted. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
DisableMenuItems(String[])
Disables the specified context menu items in the SfFileManager<TValue> component.
Declaration
public void DisableMenuItems(string[] menuItems)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | menuItems | Specifies the menu item argument to be disabled. |
DisableToolbarItems(String[])
Disables the specified toolbar items of the SfFileManager<TValue> component.
Declaration
public void DisableToolbarItems(string[] toolbarItems)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | toolbarItems | Specifies the toolbar items parameter to be disabled. |
DownloadFilesAsync(String[])
Downloads the folders or files based on the given unique identifiers programmatically in the SfFileManager<TValue> component.
Declaration
public Task DownloadFilesAsync(string[] downloadFiles = null)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | downloadFiles | An optional array of file names to download. If null, all files will be downloaded. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
DraggingCall(Double, Double)
Server call for drag start operation.
Declaration
public Task DraggingCall(double left, double top)
Parameters
Type | Name | Description |
---|---|---|
System.Double | left | Specifies the left coordinates. |
System.Double | top | Specifies the top coordinates. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
DragStartCall(Double, Double, String)
Server call for drag start operation.
Declaration
public Task DragStartCall(double left, double top, string dragDataId)
Parameters
Type | Name | Description |
---|---|---|
System.Double | left | Specifies the left coordinates. |
System.Double | top | Specifies the top coordinates. |
System.String | dragDataId | Specifies the drag data id. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
DragStopCall(String, String, String, String, Boolean, Double, Double)
Server call for drag stop operation.
Declaration
public Task DragStopCall(string dragDataId, string dropDataId, string targetModule, string activeModule, bool isLayout, double left, double top)
Parameters
Type | Name | Description |
---|---|---|
System.String | dragDataId | Specifies the drag data id. |
System.String | dropDataId | Specifies the drop data id. |
System.String | targetModule | Specifies the target module. |
System.String | activeModule | Specifies the active module. |
System.Boolean | isLayout | Specifies layout parameter. |
System.Double | left | Specifies the left coordinates. |
System.Double | top | Specifies the top coordinates. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
EnableToolbarItems(String[])
Enables specified toolbar items in the SfFileManager<TValue> component.
Declaration
public void EnableToolbarItems(string[] toolbarItems)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | toolbarItems | An array of toolbar item names to be enabled. |
FileManagerShowDialog()
Performs idevice upload operation.
Declaration
public Task FileManagerShowDialog()
Returns
Type |
---|
System.Threading.Tasks.Task |
FilterFilesAsync(List<TValue>)
Displays files that match a custom filter in the SfFileManager<TValue> component.
Declaration
public Task FilterFilesAsync(List<TValue> filterData = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<TValue> | filterData | An optional list of file and folder names to filter. If null, all files will be shown. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
GetMenuItemIndex(String)
Returns the index position of the specified context menu item in the SfFileManager<TValue> component.
Declaration
public int GetMenuItemIndex(string item)
Parameters
Type | Name | Description |
---|---|---|
System.String | item | The name of the menu item to get the index of. |
Returns
Type | Description |
---|---|
System.Int32 | The index position of the menu item. Returns |
GetSelectedFiles()
Retrieves details about the currently selected files in the SfFileManager<TValue> component.
Declaration
public List<TValue> GetSelectedFiles()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<TValue> | A list of file details. |
GetToolbarItemIndex(String)
Returns the index position of the specified toolbar item in the SfFileManager<TValue> component.
Declaration
public int GetToolbarItemIndex(string item)
Parameters
Type | Name | Description |
---|---|---|
System.String | item | The name of the toolbar item to get the index of. |
Returns
Type | Description |
---|---|
System.Int32 | The index position of the toolbar item. Returns |
GoToPageAsync(Int32)
Navigate to the specified target page number asynchronously.
Declaration
public Task GoToPageAsync(int page)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | page | Specifies the page number you want to navigate. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
Remarks
AllowPaging should be set to true
in order to use this method.
OnAfterRenderAsync(Boolean)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | Set to true for the first time component rendering; otherwise gets false. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when any changes in component state occurs.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
OnVirtualScroll(Double, Boolean)
Performs virtual scrolling.
Declaration
public Task OnVirtualScroll(double listDiff, bool isScrollingDown)
Parameters
Type | Name | Description |
---|---|---|
System.Double | listDiff | Specifies the number of rows. |
System.Boolean | isScrollingDown | Specifies the scrolling direction. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
OpenFileAsync(String)
Opens the file or folder corresponding to the specified unique identifier in the SfFileManager<TValue> component.
Declaration
public Task OpenFileAsync(string file)
Parameters
Type | Name | Description |
---|---|---|
System.String | file | The unique identifier of the file or folder to be opened. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
PreventRender(Boolean)
Prevents the FileManager render. This method will internally sets value to be returned from ShouldRender method.
Declaration
public void PreventRender(bool preventRender = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | preventRender | Default value is true. Toggles the ShouldRender method value. |
RefreshFilesAsync()
Refreshes the folder and files of the SfFileManager<TValue> component.
Declaration
public Task RefreshFilesAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
RefreshLayoutAsync()
Refreshes the entire layout of the SfFileManager<TValue> component.
Declaration
public Task RefreshLayoutAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
RenameFileAsync(String, String)
Renames the specified file or folder in the SfFileManager<TValue> component with the specified new name.
Declaration
public Task RenameFileAsync(string renameFile = null, string name = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | renameFile | The file or folder to be renamed. |
System.String | name | The new name for the file or folder. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
SelectAllAsync()
Selects all folders and files in the current path of the SfFileManager<TValue> component.
Declaration
public Task SelectAllAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
Type |
---|
System.Boolean |
TraverseBackward()
Traverses the path backward of the SfFileManager<TValue> component.
Declaration
public Task TraverseBackward()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |
UpdateChildProperties(String, Object, Boolean, Boolean)
Updates the child property of the SfFileManager<TValue> component.
Declaration
public void UpdateChildProperties(string key, object propValue, bool isDynamicPropUpdate, bool isVisibleChanged)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Specifies the key parameter. |
System.Object | propValue | Specifies the property value. |
System.Boolean | isDynamicPropUpdate | Parameter to check whether this property update dynamically. |
System.Boolean | isVisibleChanged | Parameter to check whether visibility state gets changed. |
UploadFilesAsync()
Opens the SfFileManager<TValue> component's upload dialog to allow users to upload files .
Declaration
public Task UploadFilesAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents an asynchronous action |