Hello ,
I Have one DataTable with Columns as SlNo,FirstName,LastName,MobileNO and Salary,
i want to Copy only SlNo,FirstName,LastName and Salary to anothere table .....
Using Loops i want to add Data
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manas MohapatraPosted Nov 25, 2016, 12:27 PM
copyDataTable = table.Copy();
copyDataTable.Columns.Remove("ColB");
System.Data.DataTable selected = view.ToTable("Selected", false, "col1", "col2", "col6", "col7", "col3");
Ramesh SPosted Nov 25, 2016, 8:27 AM
Midhun TpPosted Nov 25, 2016, 12:26 AM
Darshan KshirasagarPosted Nov 24, 2016, 1:58 AM
for (int i = 0; i < arrObj.Count(); i++)
{
string ColName = arrObj[i].ColName;
newTable = dt.DefaultView.ToTable(false, ColName);
}