Change RadTab ImageUrl value on client side click?

7 posts, 1 answers
  1. Arroyocode
    Arroyocode avatar
    16 posts
    Member since:
    Sep 2007

    Posted 28 Jan 2010 Link to this post

    Hey all,

    I'm curious how to change a RadTab's ImageUrl value to use another image on client click for a particular tab? The ImageUrl property is already set by default on render, just want to update it to another icon on client click?

    I was unable to locate anything in the forums that addresses this issue specifically much to my surprise.

    Thanks for the help!
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Jan 2010 Link to this post

    Hello,

    You can set the ImageUrl using the set_imageUrl() method fro client side.

    JavaScript;
     
        <script type="text/javascript"
            function selectTab() { 
                var tabStrip = $find("<%= RadTabStrip1.ClientID %>"); 
                var tab = tabStrip.findTabByText('Product'); 
                tab.set_imageUrl('../Images/Img1.gif'); 
            } 
        </script> 

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Arroyocode
    Arroyocode avatar
    16 posts
    Member since:
    Sep 2007

    Posted 29 Jan 2010 Link to this post

    Awesome! Thanks for the help Shinu. Got everything working great now. Much appreciated.
  5. Olivier
    Olivier avatar
    146 posts
    Member since:
    Nov 2010

    Posted 10 Mar 2014 in reply to Shinu Link to this post

    Hello Shinu,

    It's Exist set_selectedImageUrl in javascript function ?

    tab.set_hoveredImageUrl     = "../images/icones/24x24/error.png";
    tab.set_selectedImageUrl    = "../images/icones/24x24/error.png";
    tab.set_imageUrl            = "../images/icones/24x24/address_book.png";

    Like your link :
    http://www.telerik.com/help/aspnet-ajax/tabstrip-client-side-radtab.html

    thanks
    Olivier
  6. Olivier
    Olivier avatar
    146 posts
    Member since:
    Nov 2010

    Posted 10 Mar 2014 Link to this post

    i correct my Code

    tab.set_hoveredImageUrl("../images/icones/24x24/error.png");
    tab.set_selectedImageUrl("../images/icones/24x24/error.png");
    tab.set_imageUrl("../images/icones/24x24/address_book.png");

    It missed the function set_selectedImageUrl in api document, but it's works !
  7. Olugbenga
    Olugbenga avatar
    1 posts
    Member since:
    Apr 2016

    Posted 27 Apr Link to this post

    Hello,

    After setting the imageUrl,in another instance I would like to remove the image again. How can I remove imageUrl from radTab after applying it once.

    I have tried tab.set_imageUrl(null); and tab.set_imageUrl('');  and it didn't work.

  8. Ivan Danchev
    Admin
    Ivan Danchev avatar
    837 posts

    Posted 29 Apr Link to this post

    Hello Olugbenga,

    We logged this as a bug and we will fix it in one of our next releases. You can track its status on our Feedback Portal.

    I updated your Telerik points as a token of gratitude for reporting the bug.

    Regards,
    Ivan Danchev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017