New to Telerik UI for Blazor? Start a free 30-day trial

FileManager Events

Updated on Oct 1, 2026

This article explains the events available in the Telerik FileManager for Blazor. They are grouped logically.

CRUD Events

The OnCreate, OnUpdate and OnDelete events let you get the data item that the user changed so you can transfer the user action to the actual data source.

The OnEdit event let you respond to user actions - when they want to edit an item. See the example.

OnCreate

The OnCreate event fires when a new item is created (new folder). Its event handler receives the updated FileManagerCreateEventArgs as an argument.

OnDelete

The OnDelete event fires when a file is deleted. Its event handler receives the updated FileManagerDeleteEventArgs as an argument.

OnEdit

The OnEdit event fires when the user is about to enter edit mode for an existing item. Its event handler receives the updated FileManagerEditEventArgs as an argument.

OnUpdate

The OnUpdate event fires when a file is updated (rename finishes). Its event handler receives the updated FileManagerUpdateEventArgs as an argument.

OnDownload

The OnDownload event fires before a file download starts. The event is cancellable. The event handler argument is an FileManagerDownloadEventArgs object. See the example.

MIME Type

The FileManagerDownloadEventArgs event argument has a MimeType property, which is null when the OnDownload event fires. .NET does not provide a built-in MIME type tool, so the application must set the correct MIME type, depending on the file extension or content. Consider Microsoft.AspNetCore.StaticFiles or a similar tool.

Downloading Large Files

The files are downloaded with the help of a Base64 data URL, which is sent to the browser through JSInterop. JavaScript code generates an <a> tag with an object URL on the web page and the tag is clicked programmatically, so that the browser shows its Save File dialog.

Large files (tens or hundreds of megabytes) may hit the browser's max data URL length or some memory threshold. In such cases, perform the following steps:

You can also vote for the FileManager feature request to expose a Proxy Url for serving files from the server to the browser.

Downloading Server Files in WebAssembly Apps

A FileManager in a WebAssembly app usually displays files from a remote server. In such cases, use the following download approach:

  1. The OnDownload handler serializes and sends args.Item to the remote server. Do not try to serialize and send args.Stream.
  2. The server returns the file content.
  3. The OnDownload handler puts the returned file content to a MemoryStream and assigns it to args.Stream.

OnModelInit

The OnModelInit event fires when a new instance of the model is about to be created. Handle this event to allow the creation of a new folder/file. Provide an instance of the model that the component is bound to and include the desired properties (name, path, date of creation and more). See the example.

OnRead

The OnRead event is an alternative way to provide the FileManager with data, instead of the Data parameter. The event fires when the FileManager is initialized. The event handler receives a FileManagerReadEventArgs object as an argument.

Use the OnRead event if you want to load chunks of FileManager data on demand. The following API members are required:

  • PathChanged event
  • Rebind() method
  • OnRead event

For more information, refer to How to Load FileManager File Data on Demand.

PathChanged

The PathChanged event fires when the user navigates to a different folder through the TreeView or by double-clicking a folder item in the FileManager View. The event handler receives the new path as a string argument.

SelectedItemsChanged

The SelectedItemChanged event fires every time the user clicks on a new file/folder in the main pane of the FileManager. You can use it with one-way binding of the SelectedItems parameter to respond to user selection.

ViewChanged

The ViewChanged event fires when the user toggles between the two FileManager views (Grid and ListView). If you are using the event, make sure to update the value of the View parameter, otherwise the user action will have no effect.

Example

Handle FileManager events.

Example
View Source
Loading ...