Я пытаюсь отсортировать данные.Итак, сделал следующий код:
var dataTable = ds.Tables[DataTableName];
DataTable tempDataTable;
tempDataTable = dataTable.Clone();
tempDataTable = dataTable.AsEnumerable()
.OrderBy(x => x.Field<string>("fieldname"))
.ThenBy(x => x.Field<string>(sortColumn)).CopyToDataTable();
// issue here. it doesnt return the original table name but "Table1"
string tableN = tempDataTable.TableName;
ds.Tables.Remove(dataTable);
ds.Tables.Add(tempDataTable); // add the sorted data table
Спасибо