A different image OnHover for Checked/Unchecked buttons

3 posts, 0 answers
  1. Nicolas
    Nicolas avatar
    57 posts
    Member since:
    Dec 2008

    Posted 19 Aug 2009 Link to this post

    Hi,

    using the latest RadToolBar, I could not find a way or an example demonstrating how to have a HoveredImageUrl different for a checked button than for an unchecked button. Basically what I would have expected is a "CheckedHoveredImageUrl" property.

    Is there any easy way to have that behavior on the toolbar buttons?

    ps: I'm not going server-side on button clicks, only some js gets executed.

    Thanks
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 21 Aug 2009 Link to this post

    Hi Nicolas,

    I suggest you subscribe to OnClientCheckedStateChanged event of RadToolBar and in its handler:

    function checkedStateChanged(sender, args) 
        if(args.get_item().get_checked()) 
            args.get_item().set_hoveredImageUrl("[checkedHoveredImage]"); 
        else 
            args.get_item().set_hoveredImageUrl("[normalHoveredImage]"); 

    Best regards,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nicolas
    Nicolas avatar
    57 posts
    Member since:
    Dec 2008

    Posted 21 Aug 2009 Link to this post

    That's what I needed, thanks.
Back to Top