How to refresh node in Treeview Blazor

Answer:

we can refresh the particular node using nodeClicked() event. Here is the code snippet for your reference,

<EjsTreeViewTValue="TreeItem"@ref="tree"SortOrder="@Syncfusion.EJ2.Blazor.Navigations.SortOrder.Ascending">

        <TreeViewEventsTValue="TreeItem"NodeClicked="nodeclick">TreeViewEvents>

EjsTreeView>

publicvoid nodeclick( Syncfusion.EJ2.Blazor.Navigations.NodeClickEventArgs args)

    {

        List<object> TreeData = new List<object>();

        // you can modified the node based on your requirement and refresh the particular node

        // Here we can change the particular node icon to pdf and refresh it.

        TreeData.Add(new

        {

           Icon ="pdf"

        });

        this.tree.RefreshNode(args.Node,TreeData);

    }


Find the sample for refresh node in Treeview from here.


Loader.
Up arrow icon