Resize kendoComboBox based on remote content

2 posts, 0 answers
  1. Nadeem
    Nadeem avatar
    2 posts
    Member since:
    Oct 2015

    Posted 21 Mar 2016 Link to this post

    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 ?



  2. Dimiter Topalov
    Dimiter Topalov avatar
    635 posts

    Posted 23 Mar 2016 Link to this post

    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");

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

    Dimiter Topalov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top