ClassTelerikFileSelect
The class for the Telerik FileSelect component.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikFileSelect : TelerikUploadBase<FileSelectFileInfo>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikUploadBase<FileSelectFileInfo>TelerikFileSelect
Implements:
Inherited Members
Constructors
TelerikFileSelect()
Declaration
public TelerikFileSelect()
Properties
DropZoneClass
Declaration
[CascadingParameter(Name = "DropZoneClass")]
public string DropZoneClass { get; set; }
Property Value
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
[Parameter]
public IEnumerable<FileSelectFileInfo> Files { get; set; }
Property Value
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
[Parameter]
public EventCallback<FileSelectEventArgs> OnRemove { get; set; }
Property Value
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
[Parameter]
public EventCallback<FileSelectEventArgs> OnSelect { get; set; }
Property Value
RenderAsHiddenInput
Declaration
[CascadingParameter(Name = "RenderAsHiddenInput")]
public bool RenderAsHiddenInput { get; set; }
Property Value
ShowFileList
Declaration
[CascadingParameter(Name = "ShowFileList")]
public bool ShowFileList { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides