Hi Christopher,
Thanks for contacting Syncfusion support.
We have analyzed your query, and we have provided option to change the text of TreeNode dynamically by using public method “updateText”. You need to pass the Id or object of the node and new text to this method. It will update the text of the given TreeView node. Please refer the below code sample.
[Script]
$("#tree").ejTreeView({
loadOnDemand: true,
allowEditing: true,
fields: { dataSource: localData, id: "id", parentId: "pid", text: "name", hasChild: "hasChild" },
nodeExpand: function (args) {
if (args.value.indexOf("-expanded") == -1)
this.updateText(args.currentElement, args.value + "-expanded");
}
});
|
For more details about the updateText method then please refer the help document,
Please let us know whether the provided sample is helpful in achieving your requirement. If not, get back to us with more information for us to assist you.
Regards,
Piramanayagam R