从datagrid搜索数据 [英] searching data from datagrid

查看:95
本文介绍了从datagrid搜索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
请帮助我:
我已经创建了一个数据网格来显示SQL中的表中的数据
使用ASP.NET和存储过程.数据越来越
正确显示.现在,我想添加搜索功能.
在单击搜索按钮时,所需的数据应显示为
显示在数据网格的单行中.我想使用
文本框以插入搜索数据.

hi all,
please help me in the foll:
i have created a datagrid to display data from a table in SQL
using ASP.NET and stored procedures. the data is getting
displayed properly. now, i want to add search functionality.
on clicking the search button, the required data should get
displayed in a single row of the datagrid. i want to use
textboxes to insert search data.

推荐答案

好.您需要放置搜索文本框.根据这些文本框中的值,您将形成查询并相应地获取数据.



您还可以根据文本框中的文本过滤网格中的数据.为此,您需要使用dataview作为网格的数据源,并使用RowFilter来获取所需的数据.

试试吧!
Ok. What you need is to place the search textboxes. Based on the values put in these textboxes, you would form your query and get data accordingly.

OR

you can also have something like, filter data in grid based on text in textbox. For that you need to use dataview as datasource of grid and use RowFilter to get the needed data.

Try!


这篇关于从datagrid搜索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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