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

4 posts, 0 answers
  1. Manoj
    Manoj avatar
    75 posts
    Member since:
    Dec 2008

    Posted 17 Dec 2008 Link to this post

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

    With Thanks & Regards
    Manoj
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Dec 2008 Link to this post

    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.



  3. Manoj
    Manoj avatar
    75 posts
    Member since:
    Dec 2008

    Posted 18 Dec 2008 Link to this post

    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

  4. Manoj
    Manoj avatar
    75 posts
    Member since:
    Dec 2008

    Posted 18 Dec 2008 Link to this post

    Hi,
        I got the solution .
    I used    eventArgs._node._originalTextHtml;

    With Thanks & Regards
    Manoj

Back to Top