如何向用户单击搜索按钮显示gridview记录? [英] how can i display gridview record to user click search button?

查看:97
本文介绍了如何向用户单击搜索按钮显示gridview记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何向用户单击搜索按钮显示gridview记录?

how can i display gridview record to user click search button?

推荐答案

我已经阅读了5次,但仍然不知道你在做什么.在谈论.这是Web应用程序还是Winforms?你想让我做什么 ?您希望在用户单击搜索时获得结果的网格视图吗?
I''ve read this 5 times and still have no idea what you''re talking about. Is this a web app or winforms ? What do you want to do ? You want a gridview of results when the user clicks search ?


您想清楚了解什么吗?

如果您问:
在gridview中显示搜索结果的代码,在该视图中您在文本框中输入了一些单词作为搜索条件,然后单击搜索按钮,然后..........

1.在表单/网页上放置一个文本框,一个按钮和一个datagridview
2.根据文本框中的文本,在按钮事件处理程序中的后面的代码中编写代码以获取结果
3.必须从数据库中获取数据,编写查询以使用搜索条件获取所有内容...类似,例如,从table1中选择名称,其中名称为"searchName"
4.在数据表中获取数据
5.将数据表与datagrid
绑定 6.完成!

最后读一本书……开始阅读!
Could you be more clear in what you want to know?

If you are asking:
Code for having a search result shown in a gridview where you put some word in a textbox as a search criteria and click search button then..........

1. Put a textbox, a button and a datagridview on form/webpage
2. based on the text in textbox, write a code in button eventhandler in code behind for getting result
3. Data must being fetched from a database, write a query that fetches all with the search criteria... something like, Select Name from table1 where name like ''searchName''
4. get the data in a datatable
5. Bind the datatable with datagrid
6. Done!

lastly take a book ... start reading!


这篇关于如何向用户单击搜索按钮显示gridview记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆