Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > TreeView > Change Image/Class of Node without roundtrip

Answered Change Image/Class of Node without roundtrip

Feed from this thread
  • Posted on Sep 25, 2008 (permalink)

    Hi could anyone please guide me in the direction of how I can implement the following:
    I am replacing the image of the node  by using the following code. but for some reason I cannot get the image changed. The text of the node changes correctly but the image is not working.

    //when the node is edites  
     
    function OnNodeEdited(nodetext,imageurl)   
     
    {  
     
    var tree = $find("<%= tvwUserWorkout.ClientID %>");  
     
    tree.trackChanges();  
     
    for (var i = 0; i < tree.get_nodes().get_count(); i++) {  
     
    var node = tree.get_nodes().getNode(i);  
     
    node.set_imageUrl(imageurl);  
     
    node.set_text(nodetext);  
     
     
    }  
     
    tree.commitChanges();  
     
    }  
     

    many thanks

    Reply

  • Answer Yana Yana admin's avatar

    Posted on Sep 25, 2008 (permalink)

    Hello Shahab,

    I tested the provided code and wasn't able to reproduce the issue you're facing. Please check the attached sample project for a reference. What is different in your case?

    Regards,
    Yana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
    Attached files

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Posted on Sep 25, 2008 (permalink)

    It works perfectly now. many thanks again for your efficient support. have a great day.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > TreeView > Change Image/Class of Node without roundtrip
Related resources for "Change Image/Class of Node without roundtrip"

ASP.NET TreeView Features  |   Documentation   |  Demos  |  Step-by-step Tutorial  ]