24 April 2014

Copy rows from Datatable to another Datatable c#



foreach (DataRow dr in dataTable1.Rows)
{
     if (/* some condition */)
     {
        dataTable2.Rows.Add(dr.ItemArray);
     }
}

No comments:

Post a Comment