views:

39

answers:

1

Hi everybody!!

I have one dropdownlist like this bellow.. the problem is that if I have more than 30 ListItem the list will have 30 elements/rows display and the rest to scroll. Is there a way to show only 10 elements and scroll the rest? I read in some pages that this is not possible. Is that true?

        <asp:DropDownList ID="id" runat="server">
            <asp:ListItem Text="A" Value="AA" Enabled="true"></asp:ListItem>
            <asp:ListItem Text="B" Value="AA" Enabled="true"></asp:ListItem>
                 .                     
                 .
                 .
            <asp:ListItem Text="D" Value="AA" Enabled="true"></asp:ListItem>
        </asp:DropDownList>
+3  A: 

The browser decides how many elements get displayed, not your code. So it's not possible. Your only way around it it to use a Select Box Replacement. Then you can completely control the appearance and not rely on the browser's default.

Keltex