Previously in THIS post, showed how to ADD, UPDATE, DELETE in a DataTable using C#.
Now i will show how to copy data from one table to another table for specific columns only as for the requirement at some situations.
protected void btnCopy_Click(object sender, EventArgs e)
DataTable newTable = dt.DefaultView.ToTable(false, "Name", "Sal");
GridView2.DataSource = newTable;
catch (Exception ex)
string ErrMsg = ex.Message;
Here dt is source datatable.
Click Here to Download