joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
74 stars 55 forks source link

Sorting has issue #48

Closed sopheakmorm closed 6 years ago

sopheakmorm commented 8 years ago

query = query.OrderBy(p => p.FormName, options.SortDirection); It doesn't support with opention.SortDirection "mvcgrid.models.sortdirection is not assignable to parameter type system.collection generic.icomparer" I could not use this statement to sort my data in grid.

mrlovre commented 8 years ago

do query = options.SortDirection == SortDirection.Asc ? query.OrderBy(p => p.FormName) : query.OrderByDescending(p => p.FormName); instead.