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

[Solved] Width of combo doesn't set

1 Answer 120 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
william
Top achievements
Rank 1
william asked on 28 Feb 2012, 07:02 PM
Hi All,
I have the following:
<td style="border:1px solid red">@(Html.Telerik().ComboBox()
                                       .Name("Manufacturer_Dropdown")
                                       .DropDownHtmlAttributes(new { style = "width:100%;" })
                                       .BindTo(new SelectList(Model.ManufacturerTypes, "Value", "Text"))
                                       .Placeholder("-- Select --")
                                       .ClientEvents(events => events.OnChange("onManufacturer_Change"))
                                       .CascadeTo("Dropdown_Model")
                                  )</td>
my border for <td> takes a third of the page. You can see that I have set the combobox width to 100% so I expect the width of the combo to fill the width of my <td> element, however it doesn't. What's going on and how can I increase the width of the Combo? I'm on the latest release of the controls.

1 Answer, 1 is accepted

Sort by
0
Jonathan
Top achievements
Rank 1
answered on 16 May 2012, 04:04 PM
That only sets the width of the drop down you get when you click on the element, not the width of the element itself.

Just use HtmlAttributes(), instead of DropDownHtmlAttributes()
Tags
ComboBox
Asked by
william
Top achievements
Rank 1
Answers by
Jonathan
Top achievements
Rank 1
Share this question
or