Class
TelerikFileManager<TItem>

A complete file management component for browsing, uploading, and organizing files and folders. Supports both local data binding and server-side operations through customizable events.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

Syntax:

cs-api-definition
public class TelerikFileManager<TItem> : DataBoundComponent<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentDataBoundComponent<TItem>TelerikFileManager<TItem>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members DataBoundComponent<TItem>.SetParametersAsync(ParameterView)DataBoundComponent<TItem>.OnParametersSetAsync()DataBoundComponent<TItem>.Rebind()DataBoundComponent<TItem>.DataBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()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.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

TelerikFileManager()

Declaration

cs-api-definition
public TelerikFileManager()

Properties

DateCreatedField

Property name for creation date (local time). Default: "DateCreated".

Declaration

cs-api-definition
[Parameter]
public string DateCreatedField { get; set; }

Property Value

string

DateCreatedUtcField

Property name for creation date (UTC). Preferred over DateCreatedField. Default: "DateCreatedUtc".

Declaration

cs-api-definition
[Parameter]
public string DateCreatedUtcField { get; set; }

Property Value

string

DateModifiedField

Property name for modification date (local time). Default: "DateModified".

Declaration

cs-api-definition
[Parameter]
public string DateModifiedField { get; set; }

Property Value

string

DateModifiedUtcField

Property name for modification date (UTC). Preferred over DateModifiedField. Default: "DateModifiedUtc".

Declaration

cs-api-definition
[Parameter]
public string DateModifiedUtcField { get; set; }

Property Value

string

DialogFactory

Declaration

cs-api-definition
[CascadingParameter]
public DialogFactory DialogFactory { get; set; }

Property Value

DialogFactory

DirectoriesField

Property name for child directories collection. Default: "Directories".

Declaration

cs-api-definition
[Parameter]
public string DirectoriesField { get; set; }

Property Value

string

EnableLoaderContainer

Shows loading indicator during file operations like reading, uploading, or deleting.

Declaration

cs-api-definition
[Parameter]
public bool EnableLoaderContainer { get; set; }

Property Value

bool

ExtensionField

Property name for the file extension (without dot). Default: "Extension".

Declaration

cs-api-definition
[Parameter]
public string ExtensionField { get; set; }

Property Value

string

FileManagerSettings

Configures upload settings including URLs, file restrictions, and events. Children: FileManagerUploadSettings tag.

Declaration

cs-api-definition
[Parameter]
public RenderFragment FileManagerSettings { get; set; }

Property Value

RenderFragment

FileManagerToolBar

Defines the toolbar tools and their layout for the FileManager interface. Add toolbar components to provide users with file management actions like creating folders, uploading files, sorting, searching, and changing views. Children: FileManager toolbar tool components including: FileManagerToolBarNewFolderTool - Creates new folders in the current directory (requires OnCreate event handling), FileManagerToolBarUploadTool - Opens upload dialog for adding files (requires FileManagerSettings with upload configuration), FileManagerToolBarSortTool - Dropdown for selecting sort criteria (name, size, date modified), FileManagerToolBarSortDirectionTool - Toggle buttons for ascending/descending sort order, FileManagerToolBarFileViewTool - Switch between ListView and Grid display modes, FileManagerToolBarViewDetailsTool - Toggle visibility of the preview pane for file details, FileManagerToolBarSearchTool - Text input for filtering files and folders by name, FileManagerToolBarSpacer - Add spacing between toolbar elements, FileManagerToolBarCustomTool - Add custom buttons, dropdowns, or other interactive elements.

Declaration

cs-api-definition
[Parameter]
public RenderFragment FileManagerToolBar { get; set; }

Property Value

RenderFragment

HasDirectoriesField

Property name indicating if folder contains subdirectories. Default: "HasDirectories".

Declaration

cs-api-definition
[Parameter]
public string HasDirectoriesField { get; set; }

Property Value

string

Height

Sets the component height. Accepts CSS units like "400px" or "100%". Setting height enables internal scrolling for file lists.

Declaration

cs-api-definition
[Parameter]
public string Height { get; set; }

Property Value

string

IdField

Property name for the item's unique identifier. Default: "Id".

Declaration

cs-api-definition
[Parameter]
public string IdField { get; set; }

Property Value

string

IsDirectoryField

Property name indicating if item is a folder. Default: "IsDirectory".

Declaration

cs-api-definition
[Parameter]
public string IsDirectoryField { get; set; }

Property Value

string

ItemsField

Property name for child files collection. Default: "Items".

Declaration

cs-api-definition
[Parameter]
public string ItemsField { get; set; }

Property Value

string

NameField

Property name for the file/folder display name. Default: "Name".

Declaration

cs-api-definition
[Parameter]
public string NameField { get; set; }

Property Value

string

OnCreate

Fires when users create new folders. Handle the actual folder creation in your file system.

Declaration

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

Property Value

EventCallback<FileManagerCreateEventArgs>

OnDelete

Fires when users delete files or folders. Handle the actual removal from your file system.

Declaration

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

Property Value

EventCallback<FileManagerDeleteEventArgs>

OnDownload

Fires when users download files. Provide file content through the event args Stream property.

Declaration

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

Property Value

EventCallback<FileManagerDownloadEventArgs>

OnEdit

Fires when users start renaming files or folders. Set args.IsCancelled = true to prevent editing.

Declaration

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

Property Value

EventCallback<FileManagerEditEventArgs>

OnModelInit

Creates new model instances when your class doesn't have a parameterless constructor.

Declaration

cs-api-definition
[Parameter]
public Func<TItem> OnModelInit { get; set; }

Property Value

Func<TItem>

OnRead

Fires when the FileManager needs to load directory contents. Required for data-bound scenarios.

Declaration

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

Property Value

EventCallback<FileManagerReadEventArgs>

OnUpdate

Fires when users complete renaming operations. Persist the changes to your data store.

Declaration

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

Property Value

EventCallback<FileManagerUpdateEventArgs>

ParentIdField

Property name for the parent folder's identifier. Default: "ParentId".

Declaration

cs-api-definition
[Parameter]
public string ParentIdField { get; set; }

Property Value

string

Path

Current directory path. Use forward slashes like "/folder/subfolder". Empty string represents the root directory. Supports two-way binding.

Declaration

cs-api-definition
[Parameter]
public string Path { get; set; }

Property Value

string

PathChanged

Fires when users navigate to a different directory.

Declaration

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

Property Value

EventCallback<string>

PathField

Property name for the file/folder path. Default: "Path".

Declaration

cs-api-definition
[Parameter]
public string PathField { get; set; }

Property Value

string

SelectedItems

Collection of selected files and folders. Supports two-way binding.

Declaration

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

Property Value

IEnumerable<TItem>

SelectedItemsChanged

Fires when users select or deselect files and folders.

Declaration

cs-api-definition
[Parameter]
public EventCallback<IEnumerable<TItem>> SelectedItemsChanged { get; set; }

Property Value

EventCallback<IEnumerable<TItem>>

SizeField

Property name for the file size in bytes. Default: "Size".

Declaration

cs-api-definition
[Parameter]
public string SizeField { get; set; }

Property Value

string

View

Sets the initial display mode for files and folders. ListView shows items as icons in a list. Grid displays items in a sortable table.

Declaration

cs-api-definition
[Parameter]
public FileManagerViewType View { get; set; }

Property Value

FileManagerViewType

ViewChanged

Fires when users switch between ListView and Grid display modes.

Declaration

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

Property Value

EventCallback<FileManagerViewType>

Width

Sets the component width. Accepts CSS units like "600px" or "100%".

Declaration

cs-api-definition
[Parameter]
public string Width { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

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

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

Dispose()

Declaration

cs-api-definition
public override void Dispose()

Overrides DataBoundComponent<TItem>.Dispose()

InitJsComponentAsync()

Declaration

cs-api-definition
protected Task InitJsComponentAsync()

Returns

Task

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)