Class FileManagerEvents<TValue>
Represents the FileManagerEvents component.
Inheritance
Namespace: Syncfusion.Blazor.FileManager
Assembly: Syncfusion.Blazor.dll
Syntax
public class FileManagerEvents<TValue> : OwningComponentBase
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
public EventCallback<BeforeDownloadEventArgs<TValue>> BeforeDownload { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<BeforeImageLoadEventArgs<TValue>> BeforeImageLoad { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<BeforePopupOpenCloseEventArgs> BeforePopupClose { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<BeforePopupOpenCloseEventArgs> BeforePopupOpen { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<object> Created { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.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
public EventCallback<object> Destroyed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.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
public EventCallback<FileDragEventArgs<TValue>> FileDropped { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FileSelectEventArgs<TValue>> FileSelected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FileSelectionEventArgs<TValue>> FileSelection { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FolderCreatedEventArgs<TValue>> FolderCreated { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FolderCreateEventArgs<TValue>> FolderCreating { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FolderCreateEventArgs<TValue>> | An event callback. |
Remarks
This callback can be used to restrict the creation of folders using the cancel option 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
public EventCallback<ItemRenamedEventArgs<TValue>> ItemRenamed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<ItemRenameEventArgs<TValue>> ItemRenaming { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ItemRenameEventArgs<TValue>> | An event callback |
Remarks
This callback can be used to prevent the rename operation of specific file or folder using cancel argument
ItemsDeleted
Gets or sets an event callback that will be invoked when the file or folder is deleted successfully.
Declaration
public EventCallback<ItemsDeletedEventArgs<TValue>> ItemsDeleted { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<ItemsDeleteEventArgs<TValue>> ItemsDeleting { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<ItemsMovedEventArgs<TValue>> ItemsMoved { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<ItemsMoveEventArgs<TValue>> ItemsMoving { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ItemsMoveEventArgs<TValue>> | An event callback |
Remarks
This callback can be used to cancel the moving of specific file or folder through cancel operation.
ItemsUploaded
Gets or sets an event callback that will be invoked when the file or folder is uploaded successfully.
Declaration
public EventCallback<ItemsUploadedEventArgs<TValue>> ItemsUploaded { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<ItemsUploadEventArgs<TValue>> ItemsUploading { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
option.
MenuOpened
Gets or sets an event callback that will be invoked before the context menu is opened.
Declaration
public EventCallback<MenuOpenEventArgs<TValue>> MenuOpened { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FailureEventArgs> OnError { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FileDragEventArgs<TValue>> OnFileDragStart { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FileDragEventArgs<TValue>> OnFileDragStop { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FileLoadEventArgs<TValue>> OnFileLoad { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<FileOpenEventArgs<TValue>> OnFileOpen { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<MenuClickEventArgs<TValue>> OnMenuClick { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<ReadEventArgs<TValue>> OnRead { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<BeforeSendEventArgs> OnSend { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<SuccessEventArgs<TValue>> OnSuccess { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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 raised after the paging action is performed in the File Manager.
Declaration
public EventCallback<PageChangedEventArgs> PageChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<PageChangedEventArgs> | An event callback function. |
Remarks
The event handler receives a PageChangedEventArgs object, which provides page details after the page is changed in the File Manager.
Examples
This example shows 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 you code here
}
}
PageChanging
Gets or sets the event callback raised before the paging action is performed in the File Manager.
Declaration
public EventCallback<PageChangingEventArgs> PageChanging { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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 shows 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 you code here
}
}
PopupClosed
Gets or sets an event callback that will be invoked when the dialog is closed.
Declaration
public EventCallback<PopupOpenCloseEventArgs> PopupClosed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<PopupOpenCloseEventArgs> PopupOpened { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<SearchedEventArgs<TValue>> Searched { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<SearchEventArgs<TValue>> Searching { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<ToolbarCreateEventArgs> ToolbarCreated { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<ToolbarClickEventArgs<TValue>> ToolbarItemClicked { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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
public EventCallback<UploadListCreateArgs> UploadListCreated { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.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(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
OnInitialized()
Method invoked when the component is ready to start.
Declaration
protected override void OnInitialized()