Class
TelerikFileSelect

The class for the Telerik FileSelect component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikFileSelect : TelerikUploadBase<FileSelectFileInfo>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikUploadBase<FileSelectFileInfo>TelerikFileSelect

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members TelerikUploadBase<FileSelectFileInfo>.OnAfterRenderAsync(bool)TelerikUploadBase<FileSelectFileInfo>.ClearFiles()TelerikUploadBase<FileSelectFileInfo>.OpenSelectFilesDialog()TelerikUploadBase<FileSelectFileInfo>.SelectFilesButtonTemplateTelerikUploadBase<FileSelectFileInfo>.EnabledTelerikUploadBase<FileSelectFileInfo>.MultipleTelerikUploadBase<FileSelectFileInfo>.AcceptTelerikUploadBase<FileSelectFileInfo>.AllowedExtensionsTelerikUploadBase<FileSelectFileInfo>.MinFileSizeTelerikUploadBase<FileSelectFileInfo>.MaxFileSizeTelerikUploadBase<FileSelectFileInfo>.IdTelerikUploadBase<FileSelectFileInfo>.CaptureTelerikUploadBase<FileSelectFileInfo>.DropZoneIdTelerikUploadBase<FileSelectFileInfo>.AriaDescribedByTelerikUploadBase<FileSelectFileInfo>.AriaLabelledByBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)

Constructors

TelerikFileSelect()

Declaration

cs-api-definition
public TelerikFileSelect()

Properties

DropZoneClass

Declaration

cs-api-definition
[CascadingParameter(Name = "DropZoneClass")]
public string DropZoneClass { get; set; }

Property Value

string

Files

Preloads a collection of files to display in the FileSelect component during initialization. Use to show previously selected files, restore user sessions, or display files from server storage. Files appear in the file list as if they were selected by the user, supporting standard interactions like removal. INITIALIZATION: Files are loaded once during component initialization and become part of the current selection. RESTORATION: Essential for maintaining file selection state across page navigation or application restarts.

Declaration

cs-api-definition
[Parameter]
public IEnumerable<FileSelectFileInfo> Files { get; set; }

Property Value

IEnumerable<FileSelectFileInfo>

OnRemove

Fires before a file is removed from the selection list, allowing validation and cancellation of the removal action. Use this event to confirm file removal, clean up resources, or prevent accidental deletion of important files. Event provides access to the file being removed with all its metadata and current state information. CANCELLATION: Set IsCancelled to true to prevent the file from being removed. CLEANUP: Ideal for disposing file streams, clearing temporary data, or updating related UI state.

Declaration

cs-api-definition
[Parameter]
public EventCallback<FileSelectEventArgs> OnRemove { get; set; }

Property Value

EventCallback<FileSelectEventArgs>

OnSelect

Fires when users select one or more files through the file dialog or drag-and-drop interaction. Use this event to handle file validation, preview generation, data processing, or custom upload logic. Event provides access to selected files with metadata including name, size, extension, and content stream. CANCELLATION: Set IsCancelled to true to prevent files from being added to the file list. ASYNC: Supports asynchronous operations for file processing, validation, or server communication.

Declaration

cs-api-definition
[Parameter]
public EventCallback<FileSelectEventArgs> OnSelect { get; set; }

Property Value

EventCallback<FileSelectEventArgs>

RenderAsHiddenInput

Declaration

cs-api-definition
[CascadingParameter(Name = "RenderAsHiddenInput")]
public bool RenderAsHiddenInput { get; set; }

Property Value

bool

ShowFileList

Declaration

cs-api-definition
[CascadingParameter(Name = "ShowFileList")]
public bool ShowFileList { get; set; }

Property Value

bool

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides ComponentBase.OnInitialized()