最小化DropDownList框的大小 [英] Minimize the size of DropDownList Box

查看:98
本文介绍了最小化DropDownList框的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个DropDownList,其中显示了至少100个详细信息.
但DropDownList的OnMouseOver一次只能显示10个倾斜,并且应该具有一个垂直滚动条,以便最终用户可以使用滚动条来选择该特定值

在此先感谢

问候
Sushil Dharmar

I have a DropDownList which shows at least 100 details.
but OnMouseOver of DropDownList it should display only 10 recrods at a time and it should have an Vertical Scroll Bar so that the End user can use Scroll Bar in order to Select that specific Value

Thanks in Advance

Regards
Sushil Dharmar

推荐答案

很好的下拉列表将在浏览器中显示为html select,而据我所知,使用html select时,您将无法执行您要的操作.

相反,您可以构建自己的具有只读文本框和列表框的控件.您可以通过设置列表框的height属性来限制控件的高度.

或者,您可以使用ListBox控件并将其高度设置为显示10个项目.
或者,您也可以使用AJAX AutoCompleteExtender

**也许您可以尝试使用PagedDataSource在下拉列表的数据源上进行分页,并将PageSize设置为10.(不确定这一点)

还有,
Well dropdown list will be rendered in browser as html select and with the html select as far as I know you can not do what you ask for.

Instead, you can build your own control that has a readonly textbox and a listbox. You can limit the height of the control by setting the height property of the listbox.

OR you can use ListBox control and set the height of it to show 10 items.
OR you can also use AJAX AutoCompleteExtender

**Maybe you can try to do pagination on the data source for the drop down list using PagedDataSource and set the PageSize to 10.(Not sure about this one)

Also,
<asp:DropDownList ID="DropDownList1" onmouseover="this.size=10;" onmouseout="this.size=1;" runat="server">
</asp:DropDownList>

可以为您提供一些帮助,但可能无法涵盖全部内容.


希望这些对您有所帮助.

祝你好运,
OI

can help you a bit but may not cover it all.


I hope these are helpful.

Good luck,
OI


这篇关于最小化DropDownList框的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆