I use a Telerk Kendo UI grid that loads data remotely. QueryStringpassed to my action method looks like this: -
take=10&skip=0&page=1&pageSize=10&sort[0][field]=value&sort[0][dir]=asc
I'm trying to figure out how to bind a parameter sortto my method? Is it possible, or do I need to list through the collection QueryStringmanually or create my own binder?
So far I have tried this: -
public JsonResult GetAllContent(int page, int take, int pageSize, string[] sort)
public JsonResult GetAllContent(int page, int take, int pageSize, string sort)
but sorting is always zero. Does anyone know how I can achieve this?
I can return to using Request.QueryString, but this is a bit shred.
var field = Request.QueryString["sort[0][field]"];
var dir = Request.QueryString["sort[0][dir]"];
Rippo source
share