Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfFileManager<TValue> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfFileManager<TValue>

    This class holds the filemanager actions methods.

    Inheritance
    System.Object
    SfBaseComponent
    SfFileManager<TValue>
    Inherited Members
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.FileManager
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfFileManager<TValue> : SfBaseComponent, IFileManager
    Type Parameters
    Name Description
    TValue

    The generic type parameter.

    Constructors

    SfFileManager()

    Declaration
    public SfFileManager()

    Properties

    AllowDragAndDrop

    Enables or disables drag-and-drop of files.

    Declaration
    public bool AllowDragAndDrop { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowMultiSelection

    Enables or disables the multiple files selection of the file manager.

    Declaration
    public bool AllowMultiSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    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

    EnableHtmlSanitizer

    Defines whether to allow the cross-scripting site or not.

    Declaration
    public bool EnableHtmlSanitizer { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnablePersistence

    Enables or disables persisting component's state between page reloads. If enabled, the following APIs will persist:

    1. View: Represents the previous view of the file manager.
    2. path: Represents the previous path of the file manager.
    3. selectedItems: Represents the previous selected items in the file manager.
    Declaration
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    Height

    Specifies the height of the file manager.

    Declaration
    public string Height { get; set; }
    Property Value
    Type Description
    System.String

    ID

    Specifies the ID value of the file manager element.

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    Path

    Specifies the current path of the file manager.

    Declaration
    public string Path { get; set; }
    Property Value
    Type Description
    System.String

    PopupTarget

    Specifies the target element in which the file manager's dialog will be displayed. The default value is null, which refers to the File Manager element.

    Declaration
    public string PopupTarget { get; set; }
    Property Value
    Type Description
    System.String

    RootAliasName

    Specifies the root folder alias name in file manager.

    Declaration
    public string RootAliasName { get; set; }
    Property Value
    Type Description
    System.String

    SelectedItems

    Specifies the selected folders and files name of the file manager.

    Declaration
    public string[] SelectedItems { get; set; }
    Property Value
    Type Description
    System.String[]

    SelectedItemsChanged

    Gets or sets a callback of the bound value.

    Declaration
    public EventCallback<string[]> SelectedItemsChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.String[]>

    ShowFileExtension

    Shows or hides the file extension in file manager.

    Declaration
    public bool ShowFileExtension { get; set; }
    Property Value
    Type Description
    System.Boolean

    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

    ShowThumbnail

    Shows or hides the thumbnail images in largeicons view.

    Declaration
    public bool ShowThumbnail { get; set; }
    Property Value
    Type Description
    System.Boolean

    SortBy

    Gets or sets 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

    A field name used to sort files in the File Manager component. The default value is Name.

    Remarks

    The SortOrder property indicates whether to sort in ascending or descending order.

    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

    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

    ViewChanged

    Gets or sets a callback of the bound value.

    Declaration
    public EventCallback<ViewType> ViewChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ViewType>

    Width

    Specifies the width of the file manager.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    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 current path.

    Declaration
    public Task ClearSelectionAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    CreateFolderAsync(String)

    Creates a new folder in file manager.

    Declaration
    public Task CreateFolderAsync(string folderName = null)
    Parameters
    Type Name Description
    System.String folderName

    Specifies the folder name parameter.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    DeleteFilesAsync(String[])

    Deletes the folders or files from the given unique identifiers.

    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

    Task.

    DisableMenuItems(String[])

    Disables the specified context menu items in file manager. This method is used only in the menuOpen event.

    Declaration
    public void DisableMenuItems(string[] menuItems)
    Parameters
    Type Name Description
    System.String[] menuItems

    Specifies the menu item arguement to be disabled.

    DisableToolbarItems(String[])

    Disables the specified toolbar items of the file manager.

    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 from the given unique identifiers.

    Declaration
    public Task DownloadFilesAsync(string[] downloadFiles = null)
    Parameters
    Type Name Description
    System.String[] downloadFiles

    Specifies the files names to be downloaded.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    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)

    Server call for drag start operation.

    Declaration
    public Task DragStartCall(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.

    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 the specified toolbar items of the file manager.

    Declaration
    public void EnableToolbarItems(string[] toolbarItems)
    Parameters
    Type Name Description
    System.String[] toolbarItems

    Specifies toolbar items to be enabled.

    FilterFilesAsync(List<TValue>)

    Display the custom filtering files in file manager.

    Declaration
    public Task FilterFilesAsync(List<TValue> filterData = null)
    Parameters
    Type Name Description
    System.Collections.Generic.List<TValue> filterData

    Specifies file(s)/folder(s) to be filtered.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    GetMenuItemIndex(String)

    Returns the index position of given current context menu item in file manager.

    Declaration
    public int GetMenuItemIndex(string item)
    Parameters
    Type Name Description
    System.String item

    Specifies menu item to get its index.

    Returns
    Type Description
    System.Int32

    int.

    GetSelectedFiles()

    Gets the details of the selected files in the file manager.

    Declaration
    public List<TValue> GetSelectedFiles()
    Returns
    Type Description
    System.Collections.Generic.List<TValue>

    List.

    GetToolbarItemIndex(String)

    Returns the index position of given toolbar item in file manager.

    Declaration
    public int GetToolbarItemIndex(string item)
    Parameters
    Type Name Description
    System.String item

    Specifies item to get toolbar item index.

    Returns
    Type Description
    System.Int32

    int.

    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
    SfBaseComponent.OnAfterRenderAsync(Boolean)

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    SfBaseComponent.OnInitializedAsync()

    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 corresponding file or folder from the given unique identifier.

    Declaration
    public Task OpenFileAsync(string file)
    Parameters
    Type Name Description
    System.String file

    Specifies file to be opened.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    RefreshFilesAsync()

    Refreshes the folder files of the file manager.

    Declaration
    public Task RefreshFilesAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    RefreshLayoutAsync()

    Refreshes the layout of the file manager.

    Declaration
    public Task RefreshLayoutAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    RenameFileAsync(String, String)

    Renames the file or folder with given new name in file manager.

    Declaration
    public Task RenameFileAsync(string renameFile = null, string name = null)
    Parameters
    Type Name Description
    System.String renameFile

    Specifies rename files.

    System.String name

    Specifies new name for renaming file.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    SelectAllAsync()

    Selects the entire folders and files in current path.

    Declaration
    public Task SelectAllAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    UpdateChildProperties(String, Object, Boolean, Boolean)

    Updates the child property of the 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 dynamic property update or not.

    System.Boolean isVisibleChanged

    Parameter to check visibility state is changed or not.

    UploadFilesAsync()

    Opens the upload dialog in file manager.

    Declaration
    public Task UploadFilesAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved