如何从搜索条件中获取结果动态地加载到数据表中 [英] how to get the results from the search criteria load into a datatable dynamically
问题描述
我有动态文本框.它们将根据datagridview1中的可用列动态创建.现在需要考虑的是,我想将这些文本框用作整个datagridview1中对应列的搜索字段.当我在文本框中输入值并单击一个按钮时,结果应包含数据(行包含在动态文本框中输入的关键字),该数据包含在文本框中输入的数据将现有的datagridview1中的内容添加到另一个datagridview2控件中.
请尽快帮助我.
在此先感谢:)
谢谢&问候,
Tirumal
Hi,
I have dynamic text-boxes. They will be created dynamically based on the available columns in the datagridview1. Now the concern is i want to use these text-boxes as search fields for whole datagridview1 for the corresponding columns. When i enter the values in the text-boxes and click a button, the result should contain the data (rows that contain the keyword entered in dynamic text-boxes) that contains the entered data in text-boxes in the existing datagridview1 into another datagridview2 control.
Pls help me in getting this ASAP.
Thanks in advance :)
Thanks & Regards,
Tirumal
推荐答案
如果不查看任何代码,就不可能给出特定的答复,但是我认为您需要做的是创建将对您的邮件进行排序的一般委托.基于关键字的数据,然后在创建按钮时添加委托,就像这样
Without looking at any code it is impossible to give a specific reply, but what I think you need to do is to create a general delegate that will sort your data based on a keyword and then add the delegate when you create your button, sort of like this
Private Sub ClickHandler(ByVal sender as Object, ByVal e as System.EventArgs)
'Do Work Here
End Sub
'in the routine that creates the button do this
Dim btnFilter as New Button
btnFilter.Text = "Filter"
AddHandler btnFilter.Click ,AddressOf ClickHandler
我希望这就是你所追求的
快乐编码
I hope this is what you were after
Happy Coding
这篇关于如何从搜索条件中获取结果动态地加载到数据表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!