mtoddsmith
1 Nov 2012, 1:41 PM
Is there an example of how to use the grid with multiple sort columns and ASP.NET MVC?
I'm stuck on the issue of mapping the sort query param to a view model of some kind:
sort: [
{property: 'id', direction: 'DES'}
{property: 'name', direction: 'ASC}]
public class Sort
{
public string Property { get; set; }
public string Direction { get; set; }
}
public MyModel MyMethod(Sort[] sort) <= this bombs
{
}
I'm stuck on the issue of mapping the sort query param to a view model of some kind:
sort: [
{property: 'id', direction: 'DES'}
{property: 'name', direction: 'ASC}]
public class Sort
{
public string Property { get; set; }
public string Direction { get; set; }
}
public MyModel MyMethod(Sort[] sort) <= this bombs
{
}