Different size for ComboBox and the items that it is showing

4 posts, 1 answers
  1. Imar Spaanjaars
    Imar Spaanjaars avatar
    5 posts
    Member since:
    Mar 2010

    Posted 23 Oct 2013 Link to this post

    Hi there,

    I am using a kendoComboBox to load data from the server. I would like to limit the size of the initial control to, say 200px, but display the items that are returned from the server in a wider list, say 400px wide below the control.

    How can this be done? I tried various things such as setting explicit widths on various CSS elements. I also used a template with a <div> that has a defined width, for each item but no matter what I try, the size of the items is constrained by the size of the original ComboBox control.

    Are there any examples that show how to accomplish this?

    Thanks in advance,

    Imar
  2. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 24 Oct 2013 Link to this post

    Hello Imar,

    The dropdown that you see is actually list nested inside a div, that has a width set. In order to change the width, you need to set it on the div element. Please check the following example, showing a possible implementation:

    http://jsbin.com/uQUpuQU/3/edit
     
    Regards,
    Kiril Nikolov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Imar Spaanjaars
    Imar Spaanjaars avatar
    5 posts
    Member since:
    Mar 2010

    Posted 24 Oct 2013 Link to this post

    Hi Kiril,

    Thank you, that was exactly what I needed.

    Cheers,

    Imar
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 25 Oct 2013 Link to this post

    Hi Imar,

    I am glad that the proposed solution helped.

    If you need any further questions, please do not hesitate to contact us.
     
    Regards,
    Kiril Nikolov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready