RadzenTreeLevel Class

Configures a level of nodes in a RadzenTree during data-binding.

Inheritance

Object

ComponentBase

RadzenTreeLevel

Implements

IComponent

IHandleEvent

IHandleAfterRender

Inherited Members

ComponentBase.BuildRenderTree

ComponentBase.OnInitialized

ComponentBase.OnInitializedAsync

ComponentBase.OnParametersSet

ComponentBase.OnParametersSetAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.OnAfterRenderAsync

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.SetParametersAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenTreeLevel : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

Examples

<RadzenTree Data=@rootEmployees>
    <RadzenTreeLevel TextProperty="LastName" ChildrenProperty="Employees1"  HasChildren=@(e => (e as Employee).Employees1.Any()) />
</RadzenTree>
@code {
 IEnumerable<Employee> rootEmployees; 
 protected override void OnInitialized()
 {
    rootEmployees = NorthwindDbContext.Employees.Where(e => e.ReportsTo == null);
 }
}

Constructors

RadzenTreeLevellink

Configures a level of nodes in a RadzenTree during data-binding.

Declaration
public RadzenTreeLevel()

Properties

Checkablelink

Determines the if the checkbox of the child item can be checked.

Declaration
public Func<object, bool> Checkable { get; set; }
Property Value
Type Description
Func<object, bool>Determines the if the checkbox of the child item can be checked.
Examples
<RadzenTreeLevel Checkable=@(e => (e as Employee).LastName != null) />

CheckablePropertylink

Specifies the name of the property which provides values for the Checkable property of the child items.

Declaration
public string CheckableProperty { get; set; }
Property Value
Type Description
stringSpecifies the name of the property which provides values for the Checkable property of the child items.

ChildrenPropertylink

Specifies the name of the property which returns child data. The value returned by that property should be IEnumerable

Declaration
public string ChildrenProperty { get; set; }
Property Value
Type Description
stringSpecifies the name of the property which returns child data. The value returned by that property should be IEnumerable

Expandedlink

Determines if a child item is expanded or not. Set to value => false by default.

Declaration
public Func<object, bool> Expanded { get; set; }
Property Value
Type Description
Func<object, bool>Determines if a child item is expanded or not. Set to value => false by default.
Examples
<RadzenTreeLevel Expanded=@(e => (e as Employee).Employees1.Any()) />

HasChildrenlink

Determines if a child item has children or not. Set to value => true by default.

Declaration
public Func<object, bool> HasChildren { get; set; }
Property Value
Type Description
Func<object, bool>Determines if a child item has children or not. Set to value => true by default.
Examples
<RadzenTreeLevel HasChildren=@(e => (e as Employee).Employees1.Any()) />

Selectedlink

Determines if a child item is selected or not. Set to value => false by default.

Declaration
public Func<object, bool> Selected { get; set; }
Property Value
Type Description
Func<object, bool>Determines if a child item is selected or not. Set to value => false by default.
Examples
<RadzenTreeLevel Selected=@(e => (e as Employee).LastName == "Fuller") />

Templatelink

Gets or sets the template.

Declaration
public RenderFragment<RadzenTreeItem> Template { get; set; }
Property Value
Type Description
RenderFragment<RadzenTreeItem>Gets or sets the template.

Textlink

Determines the text of a child item.

Declaration
public Func<object, string> Text { get; set; }
Property Value
Type Description
Func<object, string>Determines the text of a child item.
Examples
<RadzenTreeLevel Text=@(e => (e as Employee).LastName) />

TextPropertylink

Specifies the name of the property which provides values for the Text property of the child items.

Declaration
public string TextProperty { get; set; }
Property Value
Type Description
stringSpecifies the name of the property which provides values for the Text property of the child items.

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.
An error has occurred. This app may no longer respond until reloaded. Reload 🗙