I tried to sort a data table with following two ways
table.DefaultView.Sort = \"Town ASC, Cutomer ASC\"
table.Select(\"\", \"Town ASC, Cutomer ASC\")
This was the shortest way I could find to sort a DataTable without having to create any new variables.
DataTable.DefaultView.Sort = "ColumnName ASC"
DataTable = DataTable.DefaultView.ToTable
Where:
ASC - Ascending
DESC - Descending
ColumnName - The column you want to sort by
DataTable - The table you want to sort