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

Dropdown width does not scale when using %

5 Answers 126 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 01 May 2012, 02:54 AM
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 

5 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 01 May 2012, 04:03 AM
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
0
Thomas
Top achievements
Rank 1
answered on 30 Jul 2012, 08:27 PM
I am having the same issue. When will this be addressed?
0
Dimo
Telerik team
answered on 31 Jul 2012, 02:25 PM
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!
0
Thomas
Top achievements
Rank 1
answered on 31 Jul 2012, 07:49 PM
that works well thanks much
0
Michael
Top achievements
Rank 1
answered on 01 Aug 2012, 01:30 AM
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
Tags
DropDownList
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Thomas
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or