CssClass selected SplitButton button

2 posts, 0 answers
  1. henk
    henk avatar
    8 posts
    Member since:
    Nov 2006

    Posted 06 Jul 2009 Link to this post

    I use a sprite for my toolbar button images. I use the CssClass property of the buttons to specify the correct image. I get the following problem, when a splitbutton child button is selected, then the CssClass of the SplitButton is not replaced by the CssClass of the selected child button.

    C# Example:

    button0.CssClass = "vf vf0"

    button1.CssClass = "vf vf1"
    button2.CssClass = "vf vf2"
    button3.CssClass = "vf vf3"

    CSS Example:











    height: 32px;



    width: 32px;



    background-image: url(sprite.png)
    : no-repeat;







    .rtbIcon { background-position : 0 0px; }






    .rtbIcon { background-position : 0 -32px; }






    .rtbIcon { background-position : 0 -64px; }






    .rtbIcon { background-position : 0 -96px; }




  2. Yana
    Yana avatar
    5001 posts

    Posted 07 Jul 2009 Link to this post

    Hi Henk,

    I suggest you subscribe to OnClientButtonClicked event and in its handler:

    <script type="text/javascript"
        function buttonClicked(sender, args) 
            args.get_item().get_parent().get_element().childNodes[0].className = args.get_item().get_element().childNodes[0].className

    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.
Back to Top