RadButton with two toggle states does not show image

2 posts, 1 answers
  1. Rob
    Rob avatar
    8 posts
    Member since:
    Aug 2010

    Posted 13 Dec 2012 Link to this post

    I want to put a button on the page that uses the ConfirmBtn-Grey.jpg image when the page loads, and then when the button is clicked it should display ConfirmBtn-Selected.jpg.

    I'm using the following RadButton definition, but not getting any images displayed on my page...

    <telerik:RadButton ID="RadButton1" runat="server" ButtonType="ToggleButton" ToggleType="CustomToggle">
            <telerik:RadButtonToggleState Selected="true" ImageUrl="../images/ConfirmBtn-Grey.jpg" />
            <telerik:RadButtonToggleState ImageUrl="../images/ConfirmBtn-Selected.jpg" />

    I've checked the paths to my images using Firebug and it's picking them up ok. Have I defined the button incorrectly?

  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Dec 2012 Link to this post


    I have made some modifications in your code. I was able to set the image by setting height and width for the button. Here is the sample code.
    <telerik:RadButton ID="RadButton1" Width="58px" Height="59px" runat="server" ButtonType="ToggleButton"ToggleType="CustomToggle">
                    <telerik:RadButtonToggleState Selected="true" ImageUrl="Images/img.png" />
                    <telerik:RadButtonToggleState ImageUrl="Images/img.gif" />

  3. DevCraft R3 2016 release webinar banner
Back to Top