如何从列表视图检索gridview中的数据 [英] how to retrieve data in gridview from listview

查看:82
本文介绍了如何从列表视图检索gridview中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个网格视图,其中的数据来自数据库.网格视图有一个名为"symbol"的列.现在我必须过滤
gridview的行,使得gridview仅包含具有
的行 该符号与listview中的符号相同(listview包含一些符号).因此如何过滤
相对于列表视图的行?

I have created a gridview in which data comes from database.The gridview has a column named "symbol".Now I have to filter
row of gridview in such a way that the gridview only contains the row which has
the symbol same as in a listview(listview contains a few symbol).so how to filter
rows in respect to the listview?

推荐答案

如何过滤相对于列表视图的行
1.使用列表视图的onchange事件或提交/过滤"按钮来过滤datagrid.
2.使用DataView& RowFilter用于过滤数据
3.将此数据视图用作gridview的数据源.

试试吧!

如有必要,请阅读:使用DataView.RowFilter [ ^ ]
how to filter rows in respect to the listview
1. Either use the onchange event of the listview or a submit/filter button to filter datagrid.
2. Use DataView & RowFilter for filtering the data
3. Use this dataview as the datasource for the gridview.

Try!

If needed, read: Using DataView.RowFilter[^]


这篇关于如何从列表视图检索gridview中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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