This question is locked. New answers and comments are not allowed.
how can I change the height of the dropdown list and combobox?
I already had tried to change the style on the combobox method DropDownHtmlAttributes, writing something like this:
.DropDownHtmlAttributes( new { style = "width = 150px; font-size: 10px; height: 70px;" } )
but it takes no effects...
there is another way to change the height ????
I already had tried to change the style on the combobox method DropDownHtmlAttributes, writing something like this:
.DropDownHtmlAttributes( new { style = "width = 150px; font-size: 10px; height: 70px;" } )
but it takes no effects...
there is another way to change the height ????
6 Answers, 1 is accepted
0
Hello Anderson,
Atanas Korchev
the Telerik team
Why are you setting width using = and height using ":" ? Both should be using ":".
.DropDownHtmlAttributes( new { style = "width:150px; font-size: 10px; height: 70px;" } )
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Anderson
Top achievements
Rank 1
answered on 14 Apr 2011, 02:02 PM
oh my!!!
I typed wrong in the example!!!
ahahahhahah
but, even with the " : " instead " = " it takes no effect yet...
in the generated html, the height is setted as "auto", but in the width, it's setted
with the value I passed...
I typed wrong in the example!!!
ahahahhahah
but, even with the " : " instead " = " it takes no effect yet...
in the generated html, the height is setted as "auto", but in the width, it's setted
with the value I passed...
0
Hi Anderson,
The specified dropdown height is ignored if there are less than 10 items. I suppose you are making tests with very few items and this causes the problem. If you add more items, you will get the expected result. Otherwise, is the height really necessary?
Kind regards,
Dimo
the Telerik team
The specified dropdown height is ignored if there are less than 10 items. I suppose you are making tests with very few items and this causes the problem. If you add more items, you will get the expected result. Otherwise, is the height really necessary?
Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Anderson
Top achievements
Rank 1
answered on 15 Apr 2011, 01:51 PM
hum...
well... there's really less than 10 items...
and yes, it's really necessary because the combobox is in a iframe inside a modal window and almost in the bottom of the window...
=(
there's some workaround for this???
well... there's really less than 10 items...
and yes, it's really necessary because the combobox is in a iframe inside a modal window and almost in the bottom of the window...
=(
there's some workaround for this???
0
Hello Anderson,
Yes, you can use a custom CSS class and a CSS rule:
CSS
Best wishes,
Dimo
the Telerik team
Yes, you can use a custom CSS class and a CSS rule:
<%= Html.Telerik().DropDownList().Name(
"DropDownList1"
)
.Items(items =>
{
items.Add().Text(
"Item 1"
);
items.Add().Text(
"Item 2"
);
items.Add().Text(
"Item 3"
);
items.Add().Text(
"Item 4"
);
})
.DropDownHtmlAttributes(
new
{ @
class
=
"shortDrop"
} )
%>
CSS
.shortDrop
{
height
:
70px
!important
;
}
Best wishes,
Dimo
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Anderson
Top achievements
Rank 1
answered on 18 Apr 2011, 02:44 PM
it works great!!!
thank you!!!
thank you!!!