RadzenTreeItem Class

A component which is an item in a RadzenTree

Inheritance

Object

ComponentBase

RadzenTreeItem

Implements

IComponent

IHandleEvent

IHandleAfterRender

Inherited Members

ComponentBase.OnInitialized

ComponentBase.OnParametersSet

ComponentBase.OnParametersSetAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.OnAfterRenderAsync

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenTreeItem : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

Constructors

RadzenTreeItemlink

A component which is an item in a RadzenTree

Declaration
public RadzenTreeItem()

Properties

Attributeslink

Specifies additional custom attributes that will be rendered by the component.

Declaration
public IReadOnlyDictionary<string, object> Attributes { get; set; }
Property Value
Type Description
IReadOnlyDictionary<string, object>Specifies additional custom attributes that will be rendered by the component.

Checkablelink

Gets or sets value indicating if the tree item checkbox can be checked.

Declaration
public bool Checkable { get; set; }
Property Value
Type Description
boolGets or sets value indicating if the tree item checkbox can be checked.

ChildContentlink

Gets or sets the child content.

Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the child content.

ContentCssClasslink

Gets or sets the CSS classes added to the content.

Declaration
public string ContentCssClass { get; set; }
Property Value
Type Description
stringGets or sets the CSS classes added to the content.

Datalink

The children data.

Declaration
public Collections.IEnumerable Data { get; set; }
Property Value
Type Description
Collections.IEnumerableThe children data.

Expandedlink

Specifies whether this item is expanded. Set to false by default.

Declaration
public bool Expanded { get; set; }
Property Value
Type Description
boolSpecifies whether this item is expanded. Set to false by default.

HasChildrenlink

Gets or sets a value indicating whether this instance has children.

Declaration
public bool HasChildren { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this instance has children.

IconCssClasslink

Gets or sets the CSS classes added to the icon.

Declaration
public string IconCssClass { get; set; }
Property Value
Type Description
stringGets or sets the CSS classes added to the icon.

LabelCssClasslink

Gets or sets the CSS classes added to the label.

Declaration
public string LabelCssClass { get; set; }
Property Value
Type Description
stringGets or sets the CSS classes added to the label.

ParentItemlink

The RadzenTreeItem which contains this item.

Declaration
public RadzenTreeItem ParentItem { get; set; }
Property Value
Type Description
RadzenTreeItemThe RadzenTreeItem which contains this item.

Selectedlink

Specifies whether this item is selected or not. Set to false by default.

Declaration
public bool Selected { get; set; }
Property Value
Type Description
boolSpecifies whether this item is selected or not. Set to false by default.

Templatelink

Gets or sets the template. Use it to customize the appearance of a tree item.

Declaration
public RenderFragment<RadzenTreeItem> Template { get; set; }
Property Value
Type Description
RenderFragment<RadzenTreeItem>Gets or sets the template. Use it to customize the appearance of a tree item.

Textlink

Gets or sets the text displayed by the tree item.

Declaration
public string Text { get; set; }
Property Value
Type Description
stringGets or sets the text displayed by the tree item.

Treelink

The RadzenTree which this item is part of.

Declaration
public RadzenTree Tree { get; set; }
Property Value
Type Description
RadzenTreeThe RadzenTree which this item is part of.

Valuelink

Gets or sets the value of the tree item.

Declaration
public object Value { get; set; }
Property Value
Type Description
objectGets or sets the value of the tree item.

Methods

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

Disposelink

Declaration
public void Dispose()

OnInitializedAsynclink

Declaration
protected override Task OnInitializedAsync()
Returns
Type Description
Task

SetParametersAsynclink

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
Task

ToggleCheckedlink

Toggles the checked state of the tree node in response to a mouse event, if checkboxes are enabled and the node is checkable.

Declaration
public Task ToggleChecked()
Returns
Type Description
TaskA task that represents the asynchronous toggle operation.
An error has occurred. This app may no longer respond until reloaded. Reload 🗙