在C Sharp中搜索一个datagridview [英] searching a datagridview in c sharp
本文介绍了在C Sharp中搜索一个datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在另一种表单上搜索我的datagridview时遇到困难.以下是我正在使用的代码及其引发的错误.有人可以指导我哪里做错了吗?谢谢
I''m having difficulty searching my datagridview on another form. Following is the code I''m using and the error its throwing. Could someone direct me as to where I have it wrong? Thanks
string search = txtFind.Text;
int iFound = batchdata.batchBindingSource.Find(search, "frmSearch.batchNumber");
batchdata.batchBindingSource.Position = iFound;
错误:在DataSource上找不到DataMember属性"15990".
("15990"是我要搜索的数字.)
error: DataMember property ''15990'' cannot be found on the DataSource.
(The ''15990'' is the number I''m searching for.)
推荐答案
Hey
如果其他两个都没有,下面的链接可能会有所帮助.希望这对您有所帮助,如果不让我知道.我会看看是否有办法做
http://www.dotneat.net/2008/12/03/DynamicDataGridViewFilteringInC.aspx [ ^ ]
我也得到了一个msdn链接,他们尝试使用find()方法.
http://msdn.microsoft.com/en-us/library/ms158165.aspx [ ^ ]
让我知道其中是否有帮助.
-
AJ
Hey
The following link may help if the other two did not. Hope this one helps if not let me know. I will see if something can be done
http://www.dotneat.net/2008/12/03/DynamicDataGridViewFilteringInC.aspx[^]
I also got a msdn link where they have tried to use the find() method.
http://msdn.microsoft.com/en-us/library/ms158165.aspx[^]
Let me know if any of these were helpful.
--
AJ
这篇关于在C Sharp中搜索一个datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文