本文介绍了在文本框中输入文本时,如何编码用于搜索datagrid中的记录的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

plz给我一些帮助..

如果我们从datagrid n搜索名字,我们就知道了..之后,我们必须找出那个名字的姓氏..为名字提取的记录应该保持原样,因为现在是n,我们必须找出我们得到的相同名字的姓氏在datagrid中.

plz send me some help..

if we r searching Firstname from datagrid n we got that.. afterwards we have to find out surname for that first name.. the records fetched for firstname should remain as it is n now we have to find out surname for the same firstname we got in datagrid..
then how we should code for it??

推荐答案

Dim query as string
if textSurname.text = string.empty then
    query = "Select Firstname From Names Where Firstname=''" + textFirstname +"''"
else
    query = "Select * From Names Where Firstname=''" + textFirstname + "'' AND Surname=''" + textSurname + "''"
end if


这篇关于在文本框中输入文本时,如何编码用于搜索datagrid中的记录的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 00:39