This is a migrated thread and some comments may be shown as answers.

Set radtoolbarsplitbutton drop down width client side

1 Answer 107 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
dexter
Top achievements
Rank 1
dexter asked on 23 Mar 2012, 05:48 AM
Hi,

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?

Regards,
Dexter

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Dec 2012, 07:18 AM
Hi Dexter,

Try the following JQuery to achieve your scenario.

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

Hope this helps.

Regards,
Princy.
Tags
ToolBar
Asked by
dexter
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or