在大数据源中实现AutoCompleteStringCollection的最佳方法是什么
问题描述:
使用winForms我在form_load中执行AutoCompleteStringCollection。
将数据库信息设置为List(Of String)变量,然后将其分配给AutoCompleteStringCollectionSource。
但如果我该怎么办?拥有大数据源。
感谢
Using winForms i doing the AutoCompleteStringCollection in form_load.
set the database information to List(Of String) variable, after that assigning it to AutoCompleteStringCollectionSource.
but what should i do if i have big data source.
Thank's
答
如果你有很多行,那么:
- 等待用户在列出以这些字符开头的选项之前输入一些字符(可能是3到4)
- 不要一次显示所有内容,也许只有50个第一行并且有用户显示更多内容的能力。
If you have a lot of rows then:
- wait for the user to input some characters perhaps 3 to 4 before listing the choices starting with those characters
- do not show everything at once, perhaps just 50 first rows and have the user ability to show more.