|
Hi I have a datatable that i would like to sort by a column (not the key column). How should one sort a table? Can the sorted table have the same name as se unsorted table? I don't know now the the name of the current column (the column that should be the index for the sorted table, only the number of order ex. aRow[120]), will that be a problem? Br |
Sort a datatable
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Adnan Hasan41 pointsPosted May 15, 2006, 5:59 AM EDT
You can sort the data Table as follows:
DataTable.DefaultView.Sort = sortExpression + " " + sortOrder;
Thank You
Adnan Hasan