根据日期绑定Datagrid值 [英] binding Datagrid Value According to date
本文介绍了根据日期绑定Datagrid值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Windows应用程序中使用Datagridview来显示数据.我正在使用上一个&
前进按钮显示下一个和上一个日期.我需要一个代码
可以遍历数据集并一次显示数据集值的一行.
我该如何实现?
Hi ,
I am using Datagridview in windows application to display data. I''m using previous &
forward button to display the next & previous date. I''m in need of a code
which can traverse through the dataset & display one row of a dataset value at a time.
How do i achieve this?
推荐答案
假定您将DataGridView.DataSource作为数据表:
Assuming you have your DataGridView.DataSource as a DataTable:
DataView dv = myDataTable.DefaultView;
dv.RowFilter = "date=''2011-03-14''";
应该为您做...
这篇关于根据日期绑定Datagrid值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文