This is a migrated thread and some comments may be shown as answers.

How can I get the original text of the edited node ?

3 Answers 29 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 17 Dec 2008, 12:57 PM
Hi,
    How can I get the original text of the edited node ?

With Thanks & Regards
Manoj

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Dec 2008, 02:12 PM
Hello Manoj,

Check out ht efollowing code to get the original text of the edited node.
cs:
protected void RadTreeView1_NodeEdit(object o, Telerik.WebControls.RadTreeNodeEventArgs e) 
    { 
        string oldtext = e.NodeEdited.Text; // original text         
        string newText = e.NewText; // new text 
         
    } 

Thanks
Princy.



0
Manoj
Top achievements
Rank 1
answered on 18 Dec 2008, 07:43 AM
Hi,
    I want this in client side . I am using the "onClientNodeEdited" event . I am using this event because when user will edit any text I will change the color of the edited node . Now it is working , but problem is when I am pressing the "F2" and click out side it is changing the coour of the node . So before chaning the color of the node I have to check whether text has  modified or not ?

I have written a function to change color of the edited node as

 

function

NewItemNodeEdited(sender, eventArgs)

 

{

 

    var node = eventArgs.get_node();

 

    eventArgs.get_node().get_textElement().style.color =

"red";

 

}

With Thanks & Regards
Manoj

0
Manoj
Top achievements
Rank 1
answered on 18 Dec 2008, 08:03 AM
Hi,
    I got the solution .
I used    eventArgs._node._originalTextHtml;

With Thanks & Regards
Manoj

Tags
TreeView
Asked by
Manoj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Manoj
Top achievements
Rank 1
Share this question
or