New to Telerik UI for BlazorStart a free 30-day trial

FileSelect Events

Updated on Aug 24, 2026

This article describes the events and event arguments of the Telerik FileSelect for Blazor:

FileSelectFileInfo

The FileSelect event handlers provide a FileSelectEventArgs argument. FileSelectEventArgs has a Files property, which is a List<FileSelectFileInfo> type.

The FileSelectFileInfo type contains the following properties:

PropertyTypeDescription
IdstringThe unique file identifier.
NamestringThe encoded file name, including the extension. One method to decode it is System.Net.WebUtility.HtmlDecode(). The file can be renamed in the OnSelect event handler.
SizelongThe file size in bytes.
ExtensionstringThe file extension.
InvalidExtensionboolA Boolean flag that shows if the file type is invalid.
InvalidMinFileSizeboolA Boolean flag that shows if file size is below the minimum.
InvalidMaxFileSizeboolA Boolean flag that shows if the file size exceeds the maximum.
StreamFileInfoStreamA System.IO.Stream that can be used to load the file to memory, file system, or other. Used for asynchronously getting the file contents as a byte array.

Due to the Blazor framework limitations, FileInfoStream does not support synchronous operations such as Read, Seek, Flush, and Write. The methods exist, but will throw an exception. A possible workaround is to copy the FileInfoStream asynchronously to another Stream with CopyToAsync, as demonstrated by the OnSelect event example below.

OnSelect

The OnSelect event fires each time when the user selects file(s) through the Select Files button or by drag and drop anywhere in the component.

The event handler receives a FileSelectEventArgs object. If you set its IsCancelled property to true, the component ignores the user action and all newly selected files do not appear in the component file list.

OnSelect fires for both valid and invalid files. You can verify if the file is valid by checking the validation-related properties of each FileSelectFileInfo object. If necessary, the application can still handle invalid files, for example, read their content.

See the example below.

OnRemove

The OnRemove event fires when the user deletes a file from the list by clicking the x icon or by pressing the Del key.

The event handler receives a FileSelectEventArgs object. The Files collection in the event argument always contains a single FileSelectFileInfo object. This is unlike the OnSelect event where Files can include one or more files.

OnRemove fires for both valid and invalid files.

Example

Handle the FileSelect OnSelect and OnRemove events

Example
View Source
Loading ...

The event is an EventCallback. It can be synchronous and return void, or asynchronous and return async Task. Do not use async void.

See Also