alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class FileManagerEvents<TValue>

    Represents the FileManagerEvents component.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    FileManagerEvents<TValue>
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.FileManager
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class FileManagerEvents<TValue> : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Type Parameters
    Name Description
    TValue

    TValue.

    Constructors

    FileManagerEvents()

    Declaration
    public FileManagerEvents()

    Properties

    BeforeDownload

    Gets or sets an event callback that will be invoked before sending the download request to the server.

    Declaration
    [Parameter]
    public EventCallback<BeforeDownloadEventArgs<TValue>> BeforeDownload { get; set; }
    Property Value
    Type Description
    EventCallback<BeforeDownloadEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to capture the download file details. Additionally, the download operation can be canceled or a custom download can be initiated from this event.

    BeforeImageLoad

    Gets or sets an event callback that will be invoked before sending the image request to the server.

    Declaration
    [Parameter]
    public EventCallback<BeforeImageLoadEventArgs<TValue>> BeforeImageLoad { get; set; }
    Property Value
    Type Description
    EventCallback<BeforeImageLoadEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to pass additional attributes that are required to load the image through the event.

    BeforePopupClose

    Gets or sets an event callback that will be invoked before the dialog is closed.

    Declaration
    [Parameter]
    public EventCallback<BeforePopupOpenCloseEventArgs> BeforePopupClose { get; set; }
    Property Value
    Type Description
    EventCallback<BeforePopupOpenCloseEventArgs>

    An event callback.

    Remarks

    This callback can be used to capture the dialog closing action and perform any necessary actions before the dialog is closed.

    BeforePopupOpen

    Gets or sets an event callback that will be invoked before the dialog is opened.

    Declaration
    [Parameter]
    public EventCallback<BeforePopupOpenCloseEventArgs> BeforePopupOpen { get; set; }
    Property Value
    Type Description
    EventCallback<BeforePopupOpenCloseEventArgs>

    An event callback.

    Remarks

    This callback can be used to perform any necessary actions, such as refreshing the dialog content or making content changes, before the dialog is opened.

    Created

    Gets or sets an event callback that will be invoked when the FileManager component is created.

    Declaration
    [Parameter]
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    An event callback.

    Remarks

    This callback can be used to perform necessary actions once the component will be rendered.

    Destroyed

    Gets or sets an event callback that will be invoked when the FileManager component is destroyed.

    Declaration
    [Parameter]
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    An event callback.

    Remarks

    This callback can be used to perform necessary actions once the component is destroyed.

    FileDropped

    Gets or sets an event callback that will be invoked after a file or folder has been dropped.

    Declaration
    [Parameter]
    public EventCallback<FileDragEventArgs<TValue>> FileDropped { get; set; }
    Property Value
    Type Description
    EventCallback<FileDragEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to capture the drop of a file or folder and perform any necessary actions.

    FileSelected

    Gets or sets an event callback that will be invoked when the file or folder is selected or unselected.

    Declaration
    [Parameter]
    public EventCallback<FileSelectEventArgs<TValue>> FileSelected { get; set; }
    Property Value
    Type Description
    EventCallback<FileSelectEventArgs<TValue>>

    An event callback.

    Remarks

    This callback allows to capture the selected or unselected file details.

    FileSelection

    Gets or sets an event callback that will be invoked before a file or folder is selected.

    Declaration
    [Parameter]
    public EventCallback<FileSelectionEventArgs<TValue>> FileSelection { get; set; }
    Property Value
    Type Description
    EventCallback<FileSelectionEventArgs<TValue>>

    An event callback.

    Remarks

    This callback is used to prevent the selection of a file or folder in certain cases, or to perform actions before a file or folder is selected.

    FolderCreated

    Gets or sets an event callback that will be invoked when the new folder is created successfully.

    Declaration
    [Parameter]
    public EventCallback<FolderCreatedEventArgs<TValue>> FolderCreated { get; set; }
    Property Value
    Type Description
    EventCallback<FolderCreatedEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to get the details of the newly created folder.

    FolderCreating

    Gets or sets an event callback that will be invoked before the folder is being created.

    Declaration
    [Parameter]
    public EventCallback<FolderCreateEventArgs<TValue>> FolderCreating { get; set; }
    Property Value
    Type Description
    EventCallback<FolderCreateEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to restrict the creation of folders using the Cancel property based on application use cases.

    ItemRenamed

    Gets or sets an event callback that will be invoked when the file or folder is renamed successfully.

    Declaration
    [Parameter]
    public EventCallback<ItemRenamedEventArgs<TValue>> ItemRenamed { get; set; }
    Property Value
    Type Description
    EventCallback<ItemRenamedEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to get the renamed file or folder details.

    ItemRenaming

    Gets or sets an event callback that will be invoked when the file or folder is being renamed.

    Declaration
    [Parameter]
    public EventCallback<ItemRenameEventArgs<TValue>> ItemRenaming { get; set; }
    Property Value
    Type Description
    EventCallback<ItemRenameEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to prevent the rename operation of specific file or folder using Cancel property.

    ItemsDeleted

    Gets or sets an event callback that will be invoked when the file or folder is deleted successfully.

    Declaration
    [Parameter]
    public EventCallback<ItemsDeletedEventArgs<TValue>> ItemsDeleted { get; set; }
    Property Value
    Type Description
    EventCallback<ItemsDeletedEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to retrieve the details of deleted files or folders.

    ItemsDeleting

    Gets or sets an event callback that will be invoked before the delete operation takes place.

    Declaration
    [Parameter]
    public EventCallback<ItemsDeleteEventArgs<TValue>> ItemsDeleting { get; set; }
    Property Value
    Type Description
    EventCallback<ItemsDeleteEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to cancel delete operations for specific files or folders, or to show a spinner at the time of the delete action.

    ItemsMoved

    Gets or sets an event callback that will be invoked when the file or folder is being pasted to the destination path.

    Declaration
    [Parameter]
    public EventCallback<ItemsMovedEventArgs<TValue>> ItemsMoved { get; set; }
    Property Value
    Type Description
    EventCallback<ItemsMovedEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to get the details of pasted folder.

    ItemsMoving

    Gets or sets an event callback that will be invoked when the file or folder is being cut or copied for the reason to be pasted in another path.

    Declaration
    [Parameter]
    public EventCallback<ItemsMoveEventArgs<TValue>> ItemsMoving { get; set; }
    Property Value
    Type Description
    EventCallback<ItemsMoveEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to cancel the moving of specific file or folder using Cancel property.

    ItemsUploaded

    Gets or sets an event callback that will be invoked when the file or folder is uploaded successfully.

    Declaration
    [Parameter]
    public EventCallback<ItemsUploadedEventArgs<TValue>> ItemsUploaded { get; set; }
    Property Value
    Type Description
    EventCallback<ItemsUploadedEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to get the details of the uploaded file or folder.

    ItemsUploading

    Gets or sets an event callback that will be invoked when the file or folder upload begins.

    Declaration
    [Parameter]
    public EventCallback<ItemsUploadEventArgs<TValue>> ItemsUploading { get; set; }
    Property Value
    Type Description
    EventCallback<ItemsUploadEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to get the details of the file or folder to be uploaded. The upload of specific type of files can be prevented here using Cancel property.

    MenuOpened

    Gets or sets an event callback that will be invoked before the context menu is opened.

    Declaration
    [Parameter]
    public EventCallback<MenuOpenEventArgs<TValue>> MenuOpened { get; set; }
    Property Value
    Type Description
    EventCallback<MenuOpenEventArgs<TValue>>

    An event callback that can be used to modify or customize the context menu items.

    Remarks

    This callback is triggered before the context menu is opened and allows customization of the menu items.

    OnError

    Gets or sets an event callback that will be invoked when the AJAX request fails.

    Declaration
    [Parameter]
    public EventCallback<FailureEventArgs> OnError { get; set; }
    Property Value
    Type Description
    EventCallback<FailureEventArgs>

    An event callback.

    Remarks

    This callback can be used to capture the error details of the file operation failures and take any necessary actions.

    OnFileDragStart

    Gets or sets an event callback that will be invoked when the file or folder dragging is started.

    Declaration
    [Parameter]
    public EventCallback<FileDragEventArgs<TValue>> OnFileDragStart { get; set; }
    Property Value
    Type Description
    EventCallback<FileDragEventArgs<TValue>>

    An event callback.

    Remarks

    This callback allows to capture the drag start of the file or folder and can be used to prevent dragging of required folders.

    OnFileDragStop

    Gets or sets an event callback that will be invoked before the file or folder is dropped at the target.

    Declaration
    [Parameter]
    public EventCallback<FileDragEventArgs<TValue>> OnFileDragStop { get; set; }
    Property Value
    Type Description
    EventCallback<FileDragEventArgs<TValue>>

    An event callback.

    Remarks

    This callback allows to prevent the drop of file or folder in required cases.

    OnFileLoad

    Gets or sets an event callback that will be invoked before the file or folder is rendered.

    Declaration
    [Parameter]
    public EventCallback<FileLoadEventArgs<TValue>> OnFileLoad { get; set; }
    Property Value
    Type Description
    EventCallback<FileLoadEventArgs<TValue>>

    An event callback.

    Remarks

    This callback allows capturing the file load event and performing any necessary actions before the file or folder is rendered.

    OnFileOpen

    Gets or sets an event callback that will be invoked before the file or folder is opened.

    Declaration
    [Parameter]
    public EventCallback<FileOpenEventArgs<TValue>> OnFileOpen { get; set; }
    Property Value
    Type Description
    EventCallback<FileOpenEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to prevent opening of any particular file or folder in required cases.

    OnMenuClick

    Gets or sets an event callback that will be invoked when the context menu item is clicked.

    Declaration
    [Parameter]
    public EventCallback<MenuClickEventArgs<TValue>> OnMenuClick { get; set; }
    Property Value
    Type Description
    EventCallback<MenuClickEventArgs<TValue>>

    An event callback.

    Remarks

    This callback allows to perform required actions when the context menu item is clicked.

    OnRead

    Gets or sets an event callback that will be invoked when the initial data is set and when the sub folders data are read.

    Declaration
    [Parameter]
    public EventCallback<ReadEventArgs<TValue>> OnRead { get; set; }
    Property Value
    Type Description
    EventCallback<ReadEventArgs<TValue>>

    An event callback.

    Remarks

    Use this event to assign local objects as SfFileManager<TValue> response or file data. This event will be raised whenever the read action takes place after the delete, rename, folder creation, cut, copy, and paste action occurs and when sub folders are opened.

    OnSend

    Gets or sets an event callback that will be invoked before sending the HttpClient request to the server.

    Declaration
    [Parameter]
    public EventCallback<BeforeSendEventArgs> OnSend { get; set; }
    Property Value
    Type Description
    EventCallback<BeforeSendEventArgs>

    An event callback.

    Remarks

    This callback can be used to pass any additional data, such as JWT token, along with the HttpClient request.

    OnSuccess

    Gets or sets an event callback that will be invoked when the HttpClient request is successful.

    Declaration
    [Parameter]
    public EventCallback<SuccessEventArgs<TValue>> OnSuccess { get; set; }
    Property Value
    Type Description
    EventCallback<SuccessEventArgs<TValue>>

    An event callback.

    Remarks

    This callback allows obtaining the result of a successful request action.

    PageChanged

    Gets or sets the event callback that is triggered after a paging action is performed in the SfFileManager<TValue> component.

    Declaration
    [Parameter]
    public EventCallback<PageChangedEventArgs> PageChanged { get; set; }
    Property Value
    Type Description
    EventCallback<PageChangedEventArgs>

    An event callback function.

    Remarks

    The event handler receives a PageChangedEventArgs object, which provides details about the page after it has changed in the FileManager.

    Examples

    This example demonstrates how to handle the PageChanged event:

    <SfFileManager TValue="FileManagerDirectoryContent" AllowPaging="true">
        <FileManagerEvents TValue="FileManagerDirectoryContent" PageChanged="OnPageChanged"></FileManagerEvents>
        <FileManagerPageSettings PageSize="5"></FileManagerPageSettings>
    </SfFileManager>
    
    @code {
    private void OnPageChanged(PageChangedEventArgs args)
    {
        // Add your code here
    }
    }

    PageChanging

    Gets or sets the event callback that is triggered before a paging action is performed in the SfFileManager<TValue> component.

    Declaration
    [Parameter]
    public EventCallback<PageChangingEventArgs> PageChanging { get; set; }
    Property Value
    Type Description
    EventCallback<PageChangingEventArgs>

    An event callback function.

    Remarks

    The event handler receives a PageChangingEventArgs object, which provides details about the before paging action in the File Manager.

    Examples

    This example demonstrates how to handle the PageChanging event:

    <SfFileManager TValue="FileManagerDirectoryContent" AllowPaging="true">
        <FileManagerEvents TValue="FileManagerDirectoryContent" PageChanging="OnPageChanging"></FileManagerEvents>
        <FileManagerPageSettings PageSize="5"></FileManagerPageSettings>
    </SfFileManager>
    
    @code {
    private void OnPageChanging(PageChangingEventArgs args)
    {
        // Add your code here
    }
    }

    PopupClosed

    Gets or sets an event callback that will be invoked when the dialog is closed.

    Declaration
    [Parameter]
    public EventCallback<PopupOpenCloseEventArgs> PopupClosed { get; set; }
    Property Value
    Type Description
    EventCallback<PopupOpenCloseEventArgs>

    An event callback.

    Remarks

    This callback allows to perform required actions after the dialog closes.

    PopupOpened

    Gets or sets an event callback that will be invoked when the dialog is opened.

    Declaration
    [Parameter]
    public EventCallback<PopupOpenCloseEventArgs> PopupOpened { get; set; }
    Property Value
    Type Description
    EventCallback<PopupOpenCloseEventArgs>

    An event callback.

    Remarks

    This callback allows performing required actions after the dialog opens, such as setting focus to a specific element or loading data dynamically.

    Searched

    Gets or sets an event callback that will be invoked when the search action is completed.

    Declaration
    [Parameter]
    public EventCallback<SearchedEventArgs<TValue>> Searched { get; set; }
    Property Value
    Type Description
    EventCallback<SearchedEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to get the search results and process it based on application scenario.

    Searching

    Gets or sets an event callback that will be invoked when the character is entered in input box for searching files or folders.

    Declaration
    [Parameter]
    public EventCallback<SearchEventArgs<TValue>> Searching { get; set; }
    Property Value
    Type Description
    EventCallback<SearchEventArgs<TValue>>

    An event callback.

    Remarks

    This callback can be used to get the search string as well as the search results based on the entered text.

    ToolbarCreated

    Gets or sets an event callback that will be invoked before creating the toolbar of the SfFileManager<TValue> component.

    Declaration
    [Parameter]
    public EventCallback<ToolbarCreateEventArgs> ToolbarCreated { get; set; }
    Property Value
    Type Description
    EventCallback<ToolbarCreateEventArgs>

    An event callback that customizes the existing toolbar items and includes custom toolbar items.

    Remarks

    Use this callback to customize the toolbar of the FileManager component, including the existing toolbar items and the custom ones that are added.

    ToolbarItemClicked

    Gets or sets an event callback that will be invoked when a toolbar item is clicked.

    Declaration
    [Parameter]
    public EventCallback<ToolbarClickEventArgs<TValue>> ToolbarItemClicked { get; set; }
    Property Value
    Type Description
    EventCallback<ToolbarClickEventArgs<TValue>>

    An event callback.

    Remarks

    This callback allows obtaining details of the clicked toolbar item and performing required actions.

    UploadListCreated

    Gets or sets an event callback that will be invoked before rendering each file item in the upload dialog box.

    Declaration
    [Parameter]
    public EventCallback<UploadListCreateArgs> UploadListCreated { get; set; }
    Property Value
    Type Description
    EventCallback<UploadListCreateArgs>

    An event callback to customize the file item details in the upload dialog.

    Remarks

    Use this callback to modify the appearance or behavior of individual file items in the upload dialog.

    Methods

    Dispose(bool)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    OwningComponentBase.Dispose(bool)

    OnInitialized()

    Method invoked when the component is ready to start.

    Declaration
    protected override void OnInitialized()
    Overrides
    ComponentBase.OnInitialized()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved