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

Resize kendoComboBox based on remote content

1 Answer 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nadeem
Top achievements
Rank 1
Nadeem asked on 21 Mar 2016, 09:59 PM

I am using a Kendo UI kendoComboBox that fetches remote data using a DataSource. Sometimes the values fetched are too large to fit in the kendoComboBox, so is it possible to adjust/autofit the width of the kendoComboBox after the data has been loaded ?

 

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 23 Mar 2016, 12:53 PM
Hi Nadeem,

You can access the list field of the Kendo UI ComboBox after the widget has been initialized, and set its width to "auto":

var combobox = $("#combobox").data("kendoComboBox");
combobox.list.width("auto");

You can also check this how-to, demonstrating this approach with a DropDownList.

Regards,
Dimiter Topalov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Nadeem
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or