DataTable table = new DataTable();
foreach (DataColumn column in dt.Columns)
{
table.Columns.Add(column.ColumnName, typeof(string));
}
I have one datable dt which have data I am creating one new Datatable and adding a column into that Datatable then my table looks like shown in below image
Now show in image column name as a number, fullname, address, date, and so on I also want to add that same column as data row but I don't know how can I add it is like data row.
And every time column name changes so when I am adding it on the Datatable table as column name I also need to add it is a data row. Please help me to do that