Server-side processing: how to bind order to MVC object
Server-side processing: how to bind order to MVC object
I am using DataTables 1.10.0 with ASP.NET MVC and I'm trying to do some fairly basic server-side processing. So far I have been able to successfully handle start, length and draw from the query string but I cannot seem to bind the order array. This is what I have currently:
decoded query string:
order[0][column]:0
order[0][dir]:asc
action:
[HttpGet]
public JsonNetResult Employees(int start, int length, int draw, Sort[] order)
Sort class:
public class Sort
{
public int column { get; set; }
public string dir { get; set; }
}
When this action is called the order array is populated and shows that it has 1 item. However column is always 0 and dir is always null. If anyone has experience with this I'd appreciate any help you can give.