第一种情况:
DataView dv = this.gridView1.DataSource as DataView; DataTable dt= dv.Table; DataRow[] rows= dt.Select(this.gridView1.RowFilter);
第二种情况:
BindingSource dv = this.gvwResult.DataSource as System.Windows.Forms.BindingSource;
DataTable dt = dv.DataSource as DataTable;
DataRow[] filteredRows = dt.Select(this.gvwResult.RowFilter);
注:gridview的属性RowFilter恰好适合DataTable的Select方法。