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

Can I change the width of the dropdown list?

3 Answers 181 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.
Sean Cross
Top achievements
Rank 1
Sean Cross asked on 15 Nov 2010, 04:49 AM
Is there any way to change the width of the dropdown list?  I have tried using DropDownHtmlAttributes without success.  E.g.

<%= Html.Telerik().ComboBox()
    .Name("ComboBox")
...
    .HtmlAttributes(new { style = "width: 200px; float: left; margin-bottom: 30px;" })

    .DropDownHtmlAttributes(new { style = "width: 500px; height: 200px; " })

    .BindTo(new SelectList(Model, "ProductID", "ProductName"))
%>

(using ClientSideEvents.aspx from the standard demo)

However this has no effect on the drop down width.  Am I missing something, or is it not possible?

Sean
.

3 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Germanov
Telerik team
answered on 15 Nov 2010, 05:56 PM
Hi Sean Cross,

I confirm this as a bug, which I am glad to inform you that it is already fixed. The fix will be included in the next official release of Telerik Components for ASP.NET MVC.

Attached is modified JavaScript file. Please replace your current file with the attached one.

I have update your Telerik points.

Sincerely yours,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sean Cross
Top achievements
Rank 1
answered on 15 Nov 2010, 09:11 PM
Thanks, works perfectly now.
0
rino
Top achievements
Rank 1
answered on 13 Dec 2010, 12:45 AM
Not sure what was updated in the js file but it seems DropDownHtmlAttributes does not work when setting the tab index.
Tags
ComboBox
Asked by
Sean Cross
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Sean Cross
Top achievements
Rank 1
rino
Top achievements
Rank 1
Share this question
or