0

I'm using telerik controls, and when I use the dropdownlist, with 11 elements, it appears a white space at the bottom of the list.

I tried in the demo page of telerik, to change the content of a dropdownlist with chrome tool and it happens the same.

If I put more than 15 elements, then a bar is displayed and I can scroll, and if there are less than 11 then the height adjusts correctly.

telerik demo

Does someone knows how to remove that withe space?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Albert Cortada
  • 737
  • 3
  • 10
  • 25

1 Answers1

1

After dragging a default RadDropDownList onto a winForm I added 11 elements. It would only show about 5 then autoscroll. I changed the DropDownMinSize's Height property to 200 and I got the following:

(http://www.sogentech.com/images/11Elements.jpg)

Judging by the link you gave, I expect you are developing for the web. Here is a short explanation about controlling size from Lancelot over on the Telerik site. I have a feeling the MinSize or equivalent setting (maybe MinDropDownHeight) is what you want to play with. The following code is specifically for Silverlight, but this should get you started on the right path:

    <!-- Here I've inserted a RadComboBox, I've also set some initial properties-->
    <telerik:RadComboBox Margin="211,59,179,0"
                         VerticalAlignment="Center"
                         HorizontalAlignment="Center"
                         MaxDropDownHeight="225"
                         MinWidth="100"
                         ScrollViewer.HorizontalScrollBarVisibility="Auto"
                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                         IsMouseWheelEnabled="False"
                         Text="Top Text Title"
                         EmptyText="empty">

        <!-- This is the default style, it uses the parent container's properties such as width and height -->
        <telerik:RadComboBoxItem Content="First list Item"/>

        <!-- You can explicitly change and set the height/width of the list item by doing this-->
        <telerik:RadComboBoxItem Content="Second List Item"
                                 Height="100"
                                 Width="100"/>

        <!-- Or you can do what I've done here. I set a Minimum width and height and then set the scrollBar to "Auto"-->
        <telerik:RadComboBoxItem Content="Third list item"
                                 ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                 ScrollViewer.VerticalScrollBarVisibility="Auto"
                                 MinHeight="50"
                                 MinWidth="200"/>


    </telerik:RadComboBox>

</Grid>
  • Thanks for the answer, but i did not explain properly, i'm not using RadControls, but the older controls of telerik @(Html.Telerik().DropDownList()) – Albert Cortada Apr 08 '13 at 13:12