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 indicating 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. The AllowDragAndDrop
property is only applicable for drag and drop within the FileManager.
Note:
- Setting
AllowDragAndDrop
tofalse
only prevents drag and drop for internal folders and files inside the FileManager component itself. - However, it does not prevent external drag-and-drop upload operations in the Blazor FileManager component.
- To prevent external drag-and-drop uploads, set the DropArea property in FileManagerUploadSettings to
null
.
AllowMultiSelection
Gets or sets a value indicating 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 first and last file or folder in the range.
AllowPaging
Gets or sets a value indicating 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 FileManager loads only the number of files and folders specified in PageSize, significantly improving performance when handling large datasets.
Additional pagination settings can be configured through FileManagerPageSettings.
CssClass
Gets or sets one or more CSS classes to customize the appearance of the SfFileManager<TValue> component.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string containing 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 modify the appearance of the SfFileManager<TValue> component.
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
When this property is enabled, it sanitizes potentially untrusted strings and scripts before rendering them in the SfFileManager<TValue> component.
EnablePersistence
Gets or sets a value indicating whether the state of the SfFileManager<TValue> component should persist between page reloads.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When enabled, the following FileManager properties will persist:
- The last selected view in the FileManager.
- The last navigated path in the FileManager.
- The last selected items in the FileManager.
EnableRangeSelection
Gets or sets a value indicating whether the SfFileManager<TValue> allows multiple item selection using 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 by dragging the mouse, similar to a file explorer. Users can hover over files or folders and drag the mouse to select the desired items.
EnableRtl
Gets or sets a value indicating whether right-to-left (RTL) 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 indicating whether virtualization is enabled in the FileManager. When enabled, only a subset of files and folders is loaded based on the viewport size, with additional items dynamically loaded as the user scrolls. This improves performance by reducing initial load time and memory usage, especially when handling a large number of files and folders.
Declaration
public bool EnableVirtualization { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Limitations:
- Programmatic selection using the
SelectAllAsync
method is not supported when virtual scrolling is enabled. - The keyboard shortcut
CTRL+A
will only select files and directories currently visible in the viewport, rather than all files and directories in the entire directory tree. - Selected file items are not retained while scrolling or switching views, ensuring optimal performance of the component.
Height
Gets or sets the height of the SfFileManager<TValue> component.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the height, which can be specified in different units such as px, %, pt, rem, or em. The default value is |
Remarks
Use this property to adjust the height of the component based on your application's layout.
ID
Gets or sets the ID of the SfFileManager<TValue> component.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the unique identifier for the component. |
Path
Gets or sets the current path of the SfFileManager<TValue> component.
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the current path. The default value is |
Remarks
The component updates this 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 where 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 | A string representing the CSS selector of the target element. |
Remarks
Use this property to specify a different container for the FileManager's dialog. This can be useful when you need to display the dialog within a specific container element instead of the default FileManager element. Supported dialogs: Rename, Delete, Details, New Folder, Upload, and Error. The target element should have the necessary attributes and styles to properly display the dialog. If the specified target element is not found, the dialog will be displayed within the FileManager element.
Examples
<div class="container">
<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>
</div>
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 | A string 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 given 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 names of the selected folders and files in 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, this 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 triggered when the selected items in the SfFileManager<TValue> component change.
Declaration
public EventCallback<string[]> SelectedItemsChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.String[]> | An event callback that receives an array of strings containing the names of the selected folders and files. |
Remarks
Use this event callback to capture the selected items and perform any necessary actions. The callback is invoked whenever the selection is updated.
ShowFileExtension
Gets or sets a value indicating whether to display file extensions in the SfFileManager<TValue> component.
Declaration
public bool ShowFileExtension { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Set this property to true
to show file extensions or false
to hide them.
ShowHiddenItems
Gets or sets a value indicating whether to display hidden files and folders in the SfFileManager<TValue> component.
Declaration
public bool ShowHiddenItems { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Set this property to true
to show hidden files and folders, or false
to hide them.
ShowItemCheckBoxes
Gets or sets a value indicating whether to display checkboxes in the SfFileManager<TValue> component.
Declaration
public bool ShowItemCheckBoxes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When enabled, checkboxes appear on hover, allowing selection of multiple files or folders.
ShowThumbnail
Gets or sets a value indicating whether to display thumbnail images in the large icons view.
Declaration
public bool ShowThumbnail { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
A boolean value that specifies whether to show thumbnail images in the large icons view.
ShowTooltip
Gets or sets a value indicating whether to display tooltips for UI elements in the SfFileManager<TValue> component.
Declaration
public bool ShowTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When enabled, tooltips will be shown for toolbar items, navigation pane, and folders.
SortBy
Gets or sets the field name used as the sorting criteria for sorting files in 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 specifies whether the folders and files should be sorted 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 a custom sort comparer object to implement a custom sorting logic.
Declaration
public IComparer<object> SortComparer { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IComparer<System.Object> | An instance of a sort comparer object that defines the custom sorting logic. The default value is |
Remarks
The custom sort comparer class should implement the IComparer interface. A custom sort comparer can be used to modify the default sorting logic for both views in the FileManager component.
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 that defines the sorting order. |
Remarks
The available options for the sort order are:
- None – Files and folders are not sorted.
- Ascending – Files and folders are sorted in ascending order.
- Descending – Files and folders 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 that specifies the initial view mode. The default value is LargeIcons. |
Remarks
Use this property to specify whether the FileManager should display files and folders as large icons or in a detailed view. The available options for the view are:
- LargeIcons – Displays files and folders as large icons with minimal details.
- Details – Displays files and folders in a detailed list format.
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 is invoked when the layout view of the SfFileManager<TValue> component is changed.
Declaration
public EventCallback<ViewType> ViewChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ViewType> | An event callback of type ViewType that is triggered when the layout view of the FileManager is changed. |
Remarks
The layout change can be detected through this event, allowing you to execute custom logic or update the state accordingly.
Width
Gets or sets the width of the SfFileManager<TValue> component.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value that defines the width of the FileManager component. |
Remarks
The width can be specified as a percentage (e.g., "100%"
) or as a pixel value (e.g., "500px"
).
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
ClearSelectionAsync()
Deselects all currently selected folders and files in the current path of 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)
Creates a new folder in the SfFileManager<TValue> component programmatically.
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[])
Deletes the specified folders or files using their 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 in 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. |
EnableToolbarItems(String[])
Enables the 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. |
FilterFilesAsync(List<TValue>)
Displays files and folders 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 |
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 retrieve the index of. |
Returns
Type | Description |
---|---|
System.Int32 | The index position of the specified menu item. Returns |
GetSelectedFiles()
Retrieves the details of 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 selected 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 retrieve the index of. |
Returns
Type | Description |
---|---|
System.Int32 | The index position of the specified 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
The AllowPaging property must be set to true
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. |
OpenFileAsync(String)
Opens the file or folder identified by 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 rendering of the SfFileManager<TValue> component. 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 |
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. |