RadzenTreeviewItem Template

I have multilevel treeview with mixed data. I would like to use Templates in load on demand according to the instructions. There is written, that the template should either be a custom Blazor component, or we should use a RenderFragment. I
would like to use a custom component, but I couldn't find instructions on how
to do that. Could you please provide some guidance?

Hi @vlksam,

If you want to use a custom component for the template you can do so like this:

builder.OpenComponent<MyComponent>(0);
builder.AddAttribute(1, "Property", "value");
builder.CloseComponent();

Change the numbers accordingly.

Hi @korchev
Thanks for fast response. Your guidance works. However I have another question.
How can I return a data from such template? For example there is a context menu defined in template and it would be nice to know selection result in main application branch.