如何根据条件从asp.net中的gridview过滤数据,并将过滤数据发送到sql server [英] how to filter data from gridview in asp.net based on condition and sent the filtere data to sql server

查看:100
本文介绍了如何根据条件从asp.net中的gridview过滤数据,并将过滤数据发送到sql server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一张桌子



 DataTable dt =  new 数据表(); 

dt.Columns.Add( bagno typeof运算(int64类型));
dt.Columns.Add( result typeof string )));


gridVirw.datasource = dt;
gridView.databind();





我的问题是现在我必须根据结果过滤网格视图中的数据将数据发送到数据库

解决方案

这个asp论坛发帖 [ ^ ]有几个链接可以帮助过滤网格视图。如果你想要使用的方法没有被覆盖,那么尝试使用asp.net过滤器gridview进行谷歌搜索。

关于将数据发送到数据库的部分问题,那么 MSDN文档 [ ^ ]是一个很好的起点,还有进一步的这个 codeproject post 的想法[ ^ ]

i have created a table

DataTable dt= new DataTable();

dt.Columns.Add("bagno", typeof(int64));
dt.Columns.Add("result", typeof(string)));


gridVirw.datasource=dt;
gridView.databind();



MY question is now i have to filter data in the grid view based an result and sent the data to the database

解决方案

In the answers to this asp forums post[^] there are several links to help with filtering gridviews. If the method you want to use isn''t covered there then try a google search with "asp.net filter gridview".
For the part of your question about sending the data to the database then the MSDN documentation[^] is a good place to start and there are futher ideas at this codeproject post[^]


这篇关于如何根据条件从asp.net中的gridview过滤数据,并将过滤数据发送到sql server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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