DataTable dt = gridControl1.DataSource as DataTable;取出DataSource中的值DataTable类型上)
DataTable dtnew = new DataTable();
DataTable dtData = this.gridControl1.DataSource as DataTable;
dtnew = dtData.Clone();
DataRow[] dataRows = dtData.Select("PRINT='1'");//将表筛选后给行的复数
foreach (DataRow dr1 in dataRows)//遍历复数行中的值 dataRows.Length//总行数
{
dtnew.Rows.Add(dr1.ItemArray);
}