Dropdown width does not scale when using %

6 posts, 0 answers
  1. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 30 Apr 2012 Link to this post

    This applies to both ComboBox and DropdownList. When the input's width is set using % to be fluid, the dropdown itself does not stay in sync once the page is rendered and then the containing size changed. In other words, the dropdown width never updates once initially rendered.

    I do not believe I am overlooking anything. It also doesn't seem to matter if setting width via CSS or adding style directly to input element. See the following basic demo link as a test. Resize the window (bigger or smaller) to see the dropdown list width remain static. Note, I only tested this in Chrome: http://jsfiddle.net/4uCHx/5/ 

    Thanks,
    Mike 
  2. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 30 Apr 2012 Link to this post

    I am extending this one, since there is another issue that seems related to above and also applies to ComboBox and DropdownList controls. The issue is extremely narrow dropdown widths when replacing content via ajax. I am adding this issue here because it also only happens when overriding Kendo's default width and using %s. In other words, when testing the same markup, specifying a fixed width seems to work fine. My problem is this is a fluid design so that is not acceptable. 

    Similar in concept to this thread, I load my content via ajax so needing to remove all the artifacts of the Kendo controls is key. I believe I am already doing that based on the info linked in that thread and also by inspecting the DOM ensuring everything is removed. But it would seem I am missing something because the dropdown widths are correct on the first render. It is only subsequent content loads that are jacked. Providing a demo of this specific behavior is a bit more complicated to do.

    Any help here?

    Thanks,
    Mike
  3. Thomas
    Thomas avatar
    4 posts
    Member since:
    Jul 2012

    Posted 30 Jul 2012 Link to this post

    I am having the same issue. When will this be addressed?
  4. Dimo
    Admin
    Dimo avatar
    8457 posts

    Posted 31 Jul 2012 Link to this post

    Hello,

    For the time being, you can use the following workaround:

    http://jsfiddle.net/dimodi/4uCHx/34/

    We will add support for the discussed behavior in the next internal and official builds of the widgets.

    All the best,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Thomas
    Thomas avatar
    4 posts
    Member since:
    Jul 2012

    Posted 31 Jul 2012 Link to this post

    that works well thanks much
  6. Michael
    Michael avatar
    40 posts
    Member since:
    Jan 2012

    Posted 31 Jul 2012 Link to this post

    It should be pointed out that the provided workaround does not work if more than one control of one type is found. I updated the example to include a loop. Here it is: http://jsfiddle.net/4uCHx/35/ 

    Cheers,
    Mike
Back to Top