开发者

DropDownList problem/doubt

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">
       开发者_如何学Go     <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>


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜