Declined
Last Updated: 28 Sep 2021 06:54 by ADMIN
nonick
Created on: 22 Jul 2019 13:23
Category: UI for Blazor
Type: Bug Report
2
Treeview inside of another treeview does not work.

When trying to create a treeview inside of another treeview template I get the following error

 

[2019-07-19T00:58:28.003Z] Error: System.InvalidOperationException: Object of type 'Telerik.Blazor.Components.TreeView.TelerikTreeView' does not have a property matching the name 'ChildContent'.

   at Microsoft.AspNetCore.Components.ParameterCollectionExtensions.ThrowForUnknownIncomingParameterName(Type targetType, String parameterName)

   at Microsoft.AspNetCore.Components.ParameterCollectionExtensions.SetParameterProperties(ParameterCollection& parameterCollection, Object target)

   at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterCollection parameters)

   at Telerik.Blazor.Components.TreeView.TelerikTreeViewBase.SetParametersAsync(ParameterCollection parameters)

   at Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterCollection parameters)

   at Microsoft.AspNetCore.Components.Rende...

4 comments
ADMIN
Marin Bratanov
Posted on: 03 Nov 2020 09:22

Hi,

We noticed that in the reproducible the markup of the treeview was wrong - the TreeViewBindings tag was missing which caused invalid configuration for the component. I am attaching two samples that seem to work fine so they can be used for comparison.

 

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Marin Bratanov
Posted on: 24 Jul 2019 09:06
I am marking this as "approved" so we will review the situation. You can Follow this page for updates.

--Marin

nonick
Posted on: 23 Jul 2019 13:08

Thanks for your reply.

 

I wanted to have a completely custom template with some other data and another separate treeview.  

ADMIN
Marin Bratanov
Posted on: 22 Jul 2019 16:36
Hi,

To add further nodes in a treeview, you should generally add more nodes in the data source or use data binding. Trees are not designed to be nested within one another. You can define different template for the different levels through new binding settings (see the second example): https://docs.telerik.com/blazor-ui/components/treeview/templates and also https://docs.telerik.com/blazor-ui/components/treeview/data-binding/overview#multiple-level-bindings.

If this does not suffice for your needs, could you provide some more details on the use case you have that requires that you nest trees and not items?


Regards,
Marin Bratanov
Progress Telerik UI for Blazor