寻求调用大批量基础数据作为录入时的解决方案

cnming 2003-07-25 11:12:32
在软件运行过程中,客户会建立大批量的基础数据,也就是一个表中的基础数据甚至超过万条记录,而大多数的模块需要调用这些数据作为录入的选择项,由于要求快速,所以无法进行分类录入,只能在这超过万条中的数据直接去匹配,再说,人们也无法明确知道哪个项目位于哪个子类中,因此我建立了拼音编码,五笔编码,编号等录入索引项目,他们只要根据这些进行索引即可。如何才能最快最方便最直观达到最好的效果。


以前,我使用了多列下拉列表进行处理,这样可以达到比较理想的效果。但是同样也存在一个缺点,就是无法使用类似like的条件进行过滤,现在使用c#,已经找不到那个控件了,同时在我的心目中,最理想的控件应该是可以达到like的效果的。

我这里的描述有点拗口,请多多包涵
请问谁有比较好的解决方案?
...全文
46 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
cnwolfs 2003-07-29
  • 打赏
  • 举报
回复
如果需要,可以给我留个mail,还没有真正做完,但是勉强可以用
cnwolfs 2003-07-29
  • 打赏
  • 举报
回复
我的解决方法大意是从http://www.codeproject.com/cs/combobox/multicolumncombo.asp下载这个控件,但是我感觉这个控件并没有做好,更没有发挥出Ado.net的特长,因此我对它改造了一下,下载它的主要原因是利用它的那个弹出的form

首先去掉codeproject里的listview,采用datagrid代替,我们可以看codeproject的这一段话
Hi, first I think this is a cool Control. Thx for it. Second I played a little bit around with it and found the following issue: I have a datagrid on the same form as the multicolumn combobox. The datagrid is populated thru a backround thread (that's important). Because this Thread posts it's results 2-3 secs later than the 'load' of the dialog (and start's imediatly with a new cycle) i found the problem that the popup window disapears everytime the datagrid is populated (in addition to that the dataset is every time a new object). I faked my scenario on your example by populating the datagrid after a 5sec timer tick (same behavior). The popup seams to get hidden by the main window i believe because the visibiliy state of the popup is still true and the 'focus leave' didn't fire. Maybe you or anyone else can explain this behavior to me and how to avoid the disapperence of the popup.

Cheers

M Neu
可以体现实用datagrid优过于listview,然后再加入一个textbox,把里头的数据table给转换成dataview,同时利用dataview里的rowfilter根据textbox里的内容进行过滤,之后的事情就不用说了
cnming 2003-07-29
  • 打赏
  • 举报
回复
cnming@netease.com

thank you
cnming 2003-07-25
  • 打赏
  • 举报
回复
snof(雪狼)

请问你有些一个控件吗?

如果使用弹出一个窗体,这样的话焦点控制比较累,每个地方都要写很复杂的程序,而且除非做得很完美,要不然有时候有可能会要求用户动用鼠标

brbrm(般若波若密)

XML方案是什么?能细细道来不?
brbrm 2003-07-25
  • 打赏
  • 举报
回复
如果使用XML方案可能会快一些?
雪狼1234567 2003-07-25
  • 打赏
  • 举报
回复
我是用DataView来过滤的,看如下的代码:
我放一个TextBox和一个DataGird,当TextBox输入变化的时候,它会自动找出相匹配的东西,
private void textBox1_TextChanged(object sender, System.EventArgs e)
{
this.dvView.RowFilter = this.mField+" like " +"'"+ this.textBox1.Text.Trim()+"%'";
}
cnming 2003-07-25
  • 打赏
  • 举报
回复
还有谁有高见,如果能提供点什么的最好

谢谢

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧