Configures a level of nodes in a RadzenTree during data-binding.
Object
ComponentBase
IComponent
IHandleEvent
IHandleAfterRender
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
public class RadzenTreeLevel : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender<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);
}
}Configures a level of nodes in a RadzenTree during data-binding.
public RadzenTreeLevel()Determines the if the checkbox of the child item can be checked.
public Func<object, bool> Checkable { get; set; }
| Type | Description |
|---|---|
| Func<object, bool> | Determines the if the checkbox of the child item can be checked. |
<RadzenTreeLevel Checkable=@(e => (e as Employee).LastName != null) />Specifies the name of the property which provides values for the Checkable property of the child items.
public string CheckableProperty { get; set; }
| Type | Description |
|---|---|
| string | Specifies the name of the property which provides values for the Checkable property of the child items. |
Specifies the name of the property which returns child data. The value returned by that property should be IEnumerable
public string ChildrenProperty { get; set; }
| Type | Description |
|---|---|
| string | Specifies the name of the property which returns child data. The value returned by that property should be IEnumerable |
Determines if a child item is expanded or not. Set to value => false by default.
public Func<object, bool> Expanded { get; set; }
| Type | Description |
|---|---|
| Func<object, bool> | Determines if a child item is expanded or not. Set to value => false by default. |
<RadzenTreeLevel Expanded=@(e => (e as Employee).Employees1.Any()) />Determines if a child item has children or not. Set to value => true by default.
public Func<object, bool> HasChildren { get; set; }
| Type | Description |
|---|---|
| Func<object, bool> | Determines if a child item has children or not. Set to value => true by default. |
<RadzenTreeLevel HasChildren=@(e => (e as Employee).Employees1.Any()) />Determines if a child item is selected or not. Set to value => false by default.
public Func<object, bool> Selected { get; set; }
| Type | Description |
|---|---|
| Func<object, bool> | Determines if a child item is selected or not. Set to value => false by default. |
<RadzenTreeLevel Selected=@(e => (e as Employee).LastName == "Fuller") />Gets or sets the template.
public RenderFragment<RadzenTreeItem> Template { get; set; }
| Type | Description |
|---|---|
| RenderFragment<RadzenTreeItem> | Gets or sets the template. |
Determines the text of a child item.
public Func<object, string> Text { get; set; }
| Type | Description |
|---|---|
| Func<object, string> | Determines the text of a child item. |
<RadzenTreeLevel Text=@(e => (e as Employee).LastName) />Specifies the name of the property which provides values for the Text property of the child items.
public string TextProperty { get; set; }
| Type | Description |
|---|---|
| string | Specifies the name of the property which provides values for the Text property of the child items. |
The RadzenTree which this item is part of.
public RadzenTree Tree { get; set; }
| Type | Description |
|---|---|
| RadzenTree | The RadzenTree which this item is part of. |