New to Telerik UI for Blazor? Download free 30-day trial

How to Rename a TreeView Node

Environment

Product TreeView for Blazor

Description

Is there any way I can edit the node text within a Blazor TreeView?

I want to let the user rename a node.

Solution

You can use the ItemTemplate to define how the node text will render and the desired UI and UX for editing. Here is a sample project that demonstrates a possible implementation. It uses a custom component EditableTreeNode that renders buttons and a textbox to update the TreeView item.

https://github.com/telerik/blazor-ui/tree/master/treeview/rename-node

In this article