Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenTreeLevel

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

    Inheritance
    object
    ComponentBase
    RadzenTreeLevel
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    Inherited Members
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.OnInitialized()
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.SetParametersAsync(ParameterView)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    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

    RadzenTreeLevel()

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

    Declaration
    public RadzenTreeLevel()
    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);
     }
    }

    Properties

    Checkable

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

    Declaration
    [Parameter]
    public Func<object, bool> Checkable { get; set; }
    Property Value
    Type Description
    Func<object, bool>
    Examples
    <RadzenTreeLevel Checkable=@(e => (e as Employee).LastName != null) />

    CheckableProperty

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

    Declaration
    [Parameter]
    public string CheckableProperty { get; set; }
    Property Value
    Type Description
    string

    ChildrenProperty

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

    Declaration
    [Parameter]
    public string ChildrenProperty { get; set; }
    Property Value
    Type Description
    string

    Expanded

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

    Declaration
    [Parameter]
    public Func<object, bool> Expanded { get; set; }
    Property Value
    Type Description
    Func<object, bool>
    Examples
    <RadzenTreeLevel Expanded=@(e => (e as Employee).Employees1.Any()) />

    HasChildren

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

    Declaration
    [Parameter]
    public Func<object, bool> HasChildren { get; set; }
    Property Value
    Type Description
    Func<object, bool>
    Examples
    <RadzenTreeLevel HasChildren=@(e => (e as Employee).Employees1.Any()) />

    Selected

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

    Declaration
    [Parameter]
    public Func<object, bool> Selected { get; set; }
    Property Value
    Type Description
    Func<object, bool>
    Examples
    <RadzenTreeLevel Selected=@(e => (e as Employee).LastName == "Fuller") />

    Template

    Gets or sets the template.

    Declaration
    [Parameter]
    public RenderFragment<RadzenTreeItem> Template { get; set; }
    Property Value
    Type Description
    RenderFragment<RadzenTreeItem>

    Text

    Determines the text of a child item.

    Declaration
    [Parameter]
    public Func<object, string> Text { get; set; }
    Property Value
    Type Description
    Func<object, string>
    Examples
    <RadzenTreeLevel Text=@(e => (e as Employee).LastName) />

    TextProperty

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

    Declaration
    [Parameter]
    public string TextProperty { get; set; }
    Property Value
    Type Description
    string

    Tree

    The RadzenTree which this item is part of.

    Declaration
    [CascadingParameter]
    public RadzenTree Tree { get; set; }
    Property Value
    Type Description
    RadzenTree

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT