Create datatable from other datatable
suppose i have 10 rows in one datatable now i have to make another datatable with last four column of previous datatable and than add 10 rows to current datatable .how to do this..
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.
Munesh SharmaPosted Jul 15, 2016, 7:36 AM
DataRow[] rowArray = Datatable1.select(“ID in (7,8,9,10)”);
foreach (DataRow row in rowArray) {
dataTable2.Rows.Add(row);
}
Vishal JadavPosted Jul 15, 2016, 7:34 AM
JohnPosted Jul 15, 2016, 7:08 AM