RadTreeview ImageUrl Problem?

3 posts, 1 answers
  1. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 07 Mar 2011 Link to this post

    Javascript
    -----------

    var textbox = document.getElementById("txtCreateLabel");
               var tree = $find("<%= radtvInbox.ClientID %>");   
               var node = new Telerik.Web.UI.RadTreeNode();
               node.set_text(textbox.value);
               node.set_imageUrl = "~/Styles/Images/Webmail_Images/MyLogo.png";
               tree.get_nodes().add(node);
               tree.commitChanges();

    My image is not displaying in javascript ? why ?
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 08 Mar 2011 Link to this post

    Hello Bhuvan,

    Try the following approach to set image for RadTreeView node.

    Java Script:
    var textbox = document.getElementById("txtCreateLabel");
    var tree = $find("<%= radtvInbox.ClientID %>");  
    var node = new Telerik.Web.UI.RadTreeNode();
    node.set_text(textbox.value);
    node.set_imageUrl('<%=Page.ResolveUrl("~/Styles/Images/Webmail_Images/MyLogo.png") %>');
    tree.get_nodes().add(node);

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 08 Mar 2011 Link to this post

    Thank you...
Back to Top