Cant change width of telerik:RadComboBox

1.1k views Asked by At

Using Telerik RadComboBox for asp.net. Having trouble setting the width of the control. No matter what I change the width do it doesn't have any effect....

<telerik:RadComboBox RenderMode="Classic" Skin="Default" 
 EnableBrowserButtonStyle="true" 
 ID="ddlSelectedItems" runat="server" CheckBoxes="true" 
 EnableCheckAllItemsCheckBox="true" 
 Width="245px" Label="" />

Any suggestions?

2

There are 2 answers

0
Rumen Jekov On

Can you set the RenderMode property to Lightweight and test again:

This works on my side.

0
Michael Bugglin On

Unfortunately, the RadComboBox always sets its width to 100%, no matter what you set the Width property to. The only way I could find to work around this is to wrap the control in a tag with a display attribute of either block or inline-block, and put the width style on the wrapper (or use a class to apply the width).

<div style="width: 245px;">
    <telerik:RadComboBox RenderMode="Classic" Skin="Default" 
     EnableBrowserButtonStyle="true" 
     ID="ddlSelectedItems" runat="server" CheckBoxes="true" 
     EnableCheckAllItemsCheckBox="true" 
     Label="" />
</div>