Class
TelerikTreeList<TItem>

The class for the Telerik TreeList component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

The type of the model to which the TreeList is bound.

Syntax:

public class TelerikTreeList<TItem> : TableGridBase<TItem, TreeListCommandEventArgs>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentDataBoundComponent<TItem>GridBase<TItem>TableGridBase<TItem, TreeListCommandEventArgs>TelerikTreeList<TItem>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members TableGridBase<TItem, TreeListCommandEventArgs>._selectedItemsMapTableGridBase<TItem, TreeListCommandEventArgs>.OnAfterRender(bool)TableGridBase<TItem, TreeListCommandEventArgs>.Dispose()TableGridBase<TItem, TreeListCommandEventArgs>.SetMultiColumnHeaders()TableGridBase<TItem, TreeListCommandEventArgs>.OnParametersSet()TableGridBase<TItem, TreeListCommandEventArgs>.HandleVirtualScrollPaging()TableGridBase<TItem, TreeListCommandEventArgs>.SetSkip(int)TableGridBase<TItem, TreeListCommandEventArgs>.ResetEditContext()TableGridBase<TItem, TreeListCommandEventArgs>.PageData()TableGridBase<TItem, TreeListCommandEventArgs>.GetItemFromDropIndex(string)TableGridBase<TItem, TreeListCommandEventArgs>.GetItemFromDropIndex(int)TableGridBase<TItem, TreeListCommandEventArgs>.DialogFactoryTableGridBase<TItem, TreeListCommandEventArgs>.IdTableGridBase<TItem, TreeListCommandEventArgs>.ColumnVirtualizationTableGridBase<TItem, TreeListCommandEventArgs>.AutoGenerateColumnsTableGridBase<TItem, TreeListCommandEventArgs>.NavigableTableGridBase<TItem, TreeListCommandEventArgs>.RowTemplateTableGridBase<TItem, TreeListCommandEventArgs>.NoDataTemplateTableGridBase<TItem, TreeListCommandEventArgs>.ResizableTableGridBase<TItem, TreeListCommandEventArgs>.ReorderableTableGridBase<TItem, TreeListCommandEventArgs>.SortableTableGridBase<TItem, TreeListCommandEventArgs>.SortModeTableGridBase<TItem, TreeListCommandEventArgs>.FilterMenuTypeTableGridBase<TItem, TreeListCommandEventArgs>.SelectedItemsTableGridBase<TItem, TreeListCommandEventArgs>.SelectedItemsChangedTableGridBase<TItem, TreeListCommandEventArgs>.EnableLoaderContainerTableGridBase<TItem, TreeListCommandEventArgs>.RowDraggableTableGridBase<TItem, TreeListCommandEventArgs>.ConfirmDeleteTableGridBase<TItem, TreeListCommandEventArgs>.RowHeightTableGridBase<TItem, TreeListCommandEventArgs>.FilterRowDebounceDelayTableGridBase<TItem, TreeListCommandEventArgs>.ShowColumnMenuTableGridBase<TItem, TreeListCommandEventArgs>.OnCreateTableGridBase<TItem, TreeListCommandEventArgs>.OnUpdateTableGridBase<TItem, TreeListCommandEventArgs>.OnDeleteTableGridBase<TItem, TreeListCommandEventArgs>.OnEditTableGridBase<TItem, TreeListCommandEventArgs>.OnAddTableGridBase<TItem, TreeListCommandEventArgs>.OnCancelTableGridBase<TItem, TreeListCommandEventArgs>.IsPopupRenderingTableGridBase<TItem, TreeListCommandEventArgs>.CurrentBreakpointGridBase<TItem>.WidthGridBase<TItem>.HeightGridBase<TItem>.PageSizeChangedGridBase<TItem>.PageSizeGridBase<TItem>.PageGridBase<TItem>.PageChangedGridBase<TItem>.PageableGridBase<TItem>.OnModelInitGridBase<TItem>.TotalCountDataBoundComponent<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.DisExceptionAsync(Exception)

Properties

EditFieldOnStateInit

Declaration

protected string EditFieldOnStateInit { get; set; }

Property Value

string

EditMode

Defines the EditMode of the TreeList. Supports None, Inline, Popup and Incell editing. The Default Option is None.

Declaration

[Parameter]
public TreeListEditMode EditMode { get; set; }

Property Value

TreeListEditMode

FilterMode

Defines the Filter Mode of the Component.

Declaration

[Parameter]
public TreeListFilterMode FilterMode { get; set; }

Property Value

TreeListFilterMode

HasChildrenField

Defines the HasChildren DataField of the DataSource.

Declaration

[Parameter]
public string HasChildrenField { get; set; }

Property Value

string

IdField

Defines the Id DataField of the DataSource.

Declaration

[Parameter]
public string IdField { get; set; }

Property Value

string

ItemsField

Defines the Items DataField of the DataSource that contains the child nodes.

Declaration

[Parameter]
public string ItemsField { get; set; }

Property Value

string

OnCollapse

Fires when a row is collapsed.

Declaration

[Parameter]
public EventCallback<TreeListCollapseEventArgs> OnCollapse { get; set; }

Property Value

EventCallback<TreeListCollapseEventArgs>

OnExpand

Fires when a row is expanded.

Declaration

[Parameter]
public EventCallback<TreeListExpandEventArgs> OnExpand { get; set; }

Property Value

EventCallback<TreeListExpandEventArgs>

OnRowClick

Fires when the user clicks on a row, or presses enter.

Declaration

[Parameter]
public EventCallback<TreeListRowClickEventArgs> OnRowClick { get; set; }

Property Value

EventCallback<TreeListRowClickEventArgs>

OnRowContextMenu

Fires when the user triggers contextmenu event with click or context menu button.

Declaration

[Parameter]
public EventCallback<TreeListRowClickEventArgs> OnRowContextMenu { get; set; }

Property Value

EventCallback<TreeListRowClickEventArgs>

OnRowDoubleClick

Fires when the user double-clicks on a row.

Declaration

[Parameter]
public EventCallback<TreeListRowClickEventArgs> OnRowDoubleClick { get; set; }

Property Value

EventCallback<TreeListRowClickEventArgs>

OnRowDrop

Fired when a row is dropped.

Declaration

[Parameter]
public EventCallback<TreeListRowDropEventArgs<TItem>> OnRowDrop { get; set; }

Property Value

EventCallback<TreeListRowDropEventArgs<TItem>>

OnRowRender

Called each time a row is rendered. Use this to add custom classes to the row based on the data item.

Declaration

[Parameter]
public Action<TreeListRowRenderEventArgs> OnRowRender { get; set; }

Property Value

Action<TreeListRowRenderEventArgs>

OnStateChanged

Fires on user interaction that causes changes in the TreeListState<TItem>.

Declaration

[Parameter]
public EventCallback<TreeListStateEventArgs<TItem>> OnStateChanged { get; set; }

Property Value

EventCallback<TreeListStateEventArgs<TItem>>

OnStateInit

Invoked when the TreeList is initialized and state could be loaded. Useful when you'd like to persist changed on page reloads.

Declaration

[Parameter]
public EventCallback<TreeListStateEventArgs<TItem>> OnStateInit { get; set; }

Property Value

EventCallback<TreeListStateEventArgs<TItem>>

ParentIdField

Defines the ParentId DataField of the DataSource. Use this DataField when the component is bound to a flat data structure.

Declaration

[Parameter]
public string ParentIdField { get; set; }

Property Value

string

ScrollMode

Defines scrolling mode of the TreeList. Possible values are Scrollable and Virtual.

Declaration

[Parameter]
public TreeListScrollMode ScrollMode { get; set; }

Property Value

TreeListScrollMode

SelectedCells

Defines the collection of selected cells. The parameter supports two-way binding. Also set SelectionMode.

Declaration

[Parameter]
public IEnumerable<TreeListSelectedCellDescriptor> SelectedCells { get; set; }

Property Value

IEnumerable<TreeListSelectedCellDescriptor>

SelectedCellsChanged

The event fires when users select or unselect cell.

Declaration

[Parameter]
public EventCallback<IEnumerable<TreeListSelectedCellDescriptor>> SelectedCellsChanged { get; set; }

Property Value

EventCallback<IEnumerable<TreeListSelectedCellDescriptor>>

SelectionMode

Defines the Selection Mode of the TreeList.

Declaration

[Parameter]
public TreeListSelectionMode SelectionMode { get; set; }

Property Value

TreeListSelectionMode

TreeListPagerTemplate

Defines the template that will be displayed instead of the Pager.

Declaration

[Parameter]
public RenderFragment TreeListPagerTemplate { get; set; }

Property Value

RenderFragment

TreeListSettings

Declaration

[Parameter]
public RenderFragment TreeListSettings { get; set; }

Property Value

RenderFragment

Methods

AutoFitAllColumns()

Declaration

public void AutoFitAllColumns()

AutoFitAllColumnsAsync()

Declaration

public Task AutoFitAllColumnsAsync()

Returns

Task

AutoFitColumn(string)

Declaration

public void AutoFitColumn(string id)

Parameters

id

string

AutoFitColumnAsync(string)

Declaration

public Task AutoFitColumnAsync(string id)

Parameters

id

string

Returns

Task

AutoFitColumns(IEnumerable<string>)

Declaration

public void AutoFitColumns(IEnumerable<string> ids)

Parameters

ids

IEnumerable<string>

AutoFitColumnsAsync(IEnumerable<string>)

Declaration

public Task AutoFitColumnsAsync(IEnumerable<string> ids)

Parameters

ids

IEnumerable<string>

Returns

Task

BuildRenderTree(RenderTreeBuilder)

Declaration

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

Dispose()

Declaration

public override void Dispose()

Overrides TableGridBase<TItem, TreeListCommandEventArgs>.Dispose()

GetItemFromDropIndex(int)

Declaration

protected override TItem GetItemFromDropIndex(int index)

Parameters

index

int

Returns

TItem

Overrides TableGridBase<TItem, TreeListCommandEventArgs>.GetItemFromDropIndex(int)

GetState()

Gets the current state of the TreeList. Includes sorting, filtering, edit items, column state, etc.

Declaration

public TreeListState<TItem> GetState()

Returns

TreeListState<TItem>

Instance of a TreeListState<TItem> class that contains all data.

OnAfterRenderAsync(bool)

Declaration

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnParametersSetAsync()

Declaration

protected override Task OnParametersSetAsync()

Returns

Task

Overrides DataBoundComponent<TItem>.OnParametersSetAsync()

SetParametersAsync(ParameterView)

Declaration

public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides DataBoundComponent<TItem>.SetParametersAsync(ParameterView)

SetSkip(int)

Declaration

protected override void SetSkip(int skip)

Parameters

skip

int

Overrides TableGridBase<TItem, TreeListCommandEventArgs>.SetSkip(int)

SetStateAsync(TreeListState<TItem>)

Sets the state of the TreeList. Includes sorting, filtering, edit items, column state, etc.

Declaration

public Task SetStateAsync(TreeListState<TItem> state)

Parameters

state

TreeListState<TItem>

Returns

Task