Accepted answer

Assuming that you are using the DynamicQuery Helper files from the Microsoft sample library (Which are in the namespace System.Linq.Dynamic) then after reading the source code it looks like you need to specify the ordering you want as follows:

myDataSource.OrderBy("someColumnName descending")


If you're using string values (like me) you'll have to concatenate it to the string like this:

myDataSource.OrderBy(columnName + " descending");

Don't forget to add a space before 'descending' otherwise you'll get an error.

Related Query

More Query from same tag