So I've been trying out the Kendo UI grid and I initially started with just the plain non-MVC helper generated client side grid, taking data from a Web API controller via GET. Worked just fine but was starting to get messy model binding the sort and filter parameters.
So I started using the MVC helpers and ran into a problem, which is this:
When using the non-MVC generated grid, configured to use GET and with the dataSource "type" NOT SET, the GET params look like this:
page 1
pageSize 10
skip 0
sort[0][dir] asc
sort[0][field] OrderID
take 10
This is the correct form to bind to the DataSourceRequest MVC helper...BUT if I render said grid using the MVC extension, it sets the dataSource "type" to "aspnetmvc-ajax" which causes the GET params to look like this:
filter
group
page 1
pageSize 10
sort OrderID-asc
(and if you have multiple sort params it joins them with a "~".). This second format will not bind properly to DataSourceRequest and so you end up with a null "Sorts" member....this seems completely backwards to me because you would only have the DataSourceRequest helper if you were using the MVC extension - but when you use them, the data is being sent incorrectly!
I also tried POSTing to a regular MVC Controller as per the examples and had the same problem.
In any case, I'm trying to find a way to tell the extension to not render the aspnetmvc-ajax. Anyone have any ideas? Thanks in advance...