RadListBox internal button css classes

4 posts, 0 answers
  1. Kumar
    Kumar avatar
    46 posts
    Member since:
    Sep 2010

    Posted 13 Mar 2012 Link to this post

    Hi,

    I am using RadListBox in one of my project.I just want to set my own css classes to the buttons(To left,To right,All right,All Left)buttons
    i didn't find any properties to set these css classes and i dnt want to use default skins/classes provided by telerik
    Can you please suggest some thing on this

    Regards
    Kumar

  2. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 15 Mar 2012 Link to this post

    Hi Kishore,

    There aren't any methods for setting classes to the transfer buttons. However you can use jQuery to achieve the same thing. Here is an example on how to add a class CustomClass to the "To Right" button:
    $telerik.$("[class*='rlbTransferFrom']").addClass("CustomClass");

    Here is a list of all the buttons and their individual classes:
    rlbMoveUp, rlbMoveDown, rlbDelete, rlbTransferFrom, rlbTransferTo, rlbTransferAllFrom, rlbTransferAllTo 
     
    Note that you have to use the *= construct when you match the classes, because when the button is disabled, the class changes (for instance from rlbMoveUp it changes to rlbMoveUpDisabled)

    Greetings,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kumar
    Kumar avatar
    46 posts
    Member since:
    Sep 2010

    Posted 20 Mar 2012 Link to this post

    Hi,

    Thanks for your reply,
    i just tried with the solution you have given it is not working ,
    Only corner of the buttons are got changes according to the css class background color property,
    But the center of the button still in default style.
    If possible can you please provide some example?

    regards
    Kishore
  5. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 21 Mar 2012 Link to this post

    Hi Kishore,

    This is due to the fact that the buttons have an inner structure consisting of several span tags. To get rid of this structure and leave only the shell of the button, you can use the following statement, which you can put in the handler for the OnClientLoad event:
    function clientLoad(sender) {
        $telerik.$('.rlbButton').html('');
        $telerik.$('.rlbButton').css('background-color', 'Black');
    }

     
    Kind regards,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top