Set radtoolbarsplitbutton drop down width client side

2 posts, 0 answers
  1. dexter
    dexter avatar
    31 posts
    Member since:
    Jul 2011

    Posted 23 Mar 2012 Link to this post


    Is it possible to do the above? Currently i have a splitbutton as the last object in my toolbar. Where all of this is inside a radwindow.
    Problem is, when i click on the splitbutton, the dropdown width exceeds the size of the radwindow causing misalignment.
    I tried to change the size of the dropdown by doing so: $(".RadToolBarDropDown").css("width", "150px !important");
    but to no avail.

    To make sure i'm selecting the correct element, i used this: $(".RadToolBarDropDown").css("border", "1px solid red !important");
    and the element is highlighted with red border. Why is it possible to set the border but not the width?

    Currently, what i can do is just hardcode the width. I wanted to set the size dynamically. Is it possible?

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Dec 2012 Link to this post

    Hi Dexter,

    Try the following JQuery to achieve your scenario.

    <script type="text/javascript">
        $(document).ready(function () {
            $(".RadToolBarDropDown").attr('style', "width:150px");

    Hope this helps.

Back to Top