We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Dynamically changing text

Thread ID:

Created:

Updated:

Platform:

Replies:

125217 Jul 31,2016 05:54 PM Aug 1,2016 07:25 AM JavaScript 1
loading
Tags: ejTreeView
CHRISTOPHER KELLY
Asked On July 31, 2016 05:54 PM

I would like to change the text that is displayed based on criteria - aka "loading treeview node n of x" how would I go about that.

Piramanayagam Ramakrishnan [Syncfusion]
Replied On August 1, 2016 07:25 AM

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, 
 
For your reference, we have prepared a sample based on your requirement (“Dynamically changing text”) in the link: http://jsplayground.syncfusion.com/rvvtpkvt 
   
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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;