The following code will copy each row from one grid to another.
foreach (DataRow row in dataTable1.Rows)
{
dataTable2.Rows.Add(row.ItemArray);
}
If you want to copy some specific columns use a if statment while copying to the other grid. So it becomes:
foreach (DataRow row in dataTable1.Rows)
{
if(Condition)
{
dataTable2.Rows.Add(row.ItemArray);
}
}
Good luck,
OI