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

[Solved] How can I set width of the dropdown to "Auto"

0 Answers 9 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.
Raghavendra
Top achievements
Rank 1
Raghavendra asked on 03 Dec 2012, 09:03 AM
I have a ComboBox in razor view. Content of the combo box is populated at client side multiple times.
I have set the width of dropdown to "auto" as follows
@(Html.Telerik().ComboBox().Name("Groups_ID").AutoFill(true).DropDownHtmlAttributes(new { style = "width:auto;" }))

When I pull down the dropdown first time, it sets it width using it's content. However, if the combobox is populated again, and if I pull down it, the width does not get adjusted as per the new content.

How can tell the combo to adjust its width whenever the content is populated?
Tags
ComboBox
Asked by
Raghavendra
Top achievements
Rank 1
Share this question
or