node.set_text not working.

7 posts, 0 answers
  1. Dale Palmer
    Dale Palmer avatar
    27 posts
    Member since:
    May 2008

    Posted 26 Jan 2009 Link to this post

    1             <telerik:RadTreeView ID="rtvQuickshop" 
    2                                  runat="server" 
    3                                  LoadingMessage="Loading ... " 
    4                                  CheckBoxes="true" 
    5                                  PersistLoadOnDemandNodes="false" 
    6                                  EnableViewState="false" 
    7                                  ShowLineImages="false" 
    8                                  EnableEmbeddedScripts="false" 
    9                                  OnNodeDataBound="rtvQuickshop_OnNodeDataBound" 
    10                                  OnClientNodeChecking="NodeChecking" 
    11                                  OnClientNodePopulating="NodePopulating" 
    12                                  Skin="Web20"
    13                 <WebServiceSettings Path="~/QuickShop.asmx" Method="GetNodes" /> 
    14              
    15             </telerik:RadTreeView> 

    I have the following RadTreeView and in the client NodeChecking event I have the following

    1 function NodeChecking(sender, eventArgs) 
    2
    3     var node = eventArgs.get_node(); 
    4     if(node.get_checked()) 
    5     { 
    6         node.set_text('<img src="/Images/Refreshing.gif" alt="Removing from basket, please wait..." class="qs_refresh" /> <span class="qs_normal">Removing from basket, please wait...</span>'); 
    7     } 
    8     else 
    9     { 
    10         node.set_text('<img src="/Images/Refreshing.gif" alt="Adding to basket, please wait..." class="qs_refresh" /> <span class="qs_normal">Adding to basket, please wait...</span>'); 
    11     } 
    12

    But node.set_text does not work??????????????????????????????????????
  2. Dale Palmer
    Dale Palmer avatar
    27 posts
    Member since:
    May 2008

    Posted 26 Jan 2009 Link to this post

    It stopped working when i switched to a web service.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dale Palmer
    Dale Palmer avatar
    27 posts
    Member since:
    May 2008

    Posted 26 Jan 2009 Link to this post

    Fixed.

    I used node.get_textElement().innerHTML = x;
  5. McCarpenter
    McCarpenter avatar
    8 posts
    Member since:
    Mar 2008

    Posted 23 Apr 2010 Link to this post

    node.get_textElement().innerHTML works fine - but if you write TreeView to xml on postback - with 

    treeView.GetXml() method  - the resulting xml wouldn't be changed. My node contains "<img src='' ..." with text before image. 

  6. Jose
    Jose avatar
    2 posts
    Member since:
    Sep 2013

    Posted 20 Aug 2015 Link to this post

    Is there a solution for this?

     I have the same problem...  When I remove a node, I update the removed node's parent text with set_text.  I get the JSON object before and after setting the text and the parent node's text changes in the JSON object, but doesn't get reflected in the tree...

     I tried parentNode.get_textElement().innerHTML without any luck...

  7. Jose
    Jose avatar
    2 posts
    Member since:
    Sep 2013

    Posted 20 Aug 2015 Link to this post

    Just for future reference...

    In my case, the issue was that I was using a client Template and calling set_clientTemplate at one point.  I guess the template has precedence over the text property.

  8. Ivan Danchev
    Admin
    Ivan Danchev avatar
    835 posts

    Posted 24 Aug 2015 Link to this post

    Hello,

    Thank you for sharing the source of the issue.

    Regards,
    Ivan Danchev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017