Friday, 15 April 2011

asp.net mvc - Kendo UI Grid MVC Helper how to NOT render "type": "aspnetmvc-ajax" -


So I'm trying out the Candido UI grid and initially just created a plain non-MVC assistant client side grid, GET Taking the data from a Web API Controller via Worked fine, but the messy model was sorted and bound to force filter parameters.

So I started using MVC helpers and participated in a problem, which is this:

The grid generated from non-MVC, configured to use GET GET parameters look like this, with the data source "type" not set:

  Page 1 page size 10 skip 0 sort [0] [dir] Ankus sort [0] [ Field] OrderID 10   

This is the correct form of joining the DatasourceArvive MVC assistant ... but If I say grid using the MVC extension, then the data sets sorts "type" as "aspnetmvc-ajax", which causes the GET parameter to look like this:

 < Code> Filter Group Page 1 Page Size 10 Type Order ID-asc   

(And if you have more than one type of consultation, join them with "~".) This second format will not properly bind the datasourcequest and therefore you will end up with a null "sort" member .... This is completely behind me because you are the only data source resource requestor If you were using MVC extension - but when you use them, the data is being sent incorrectly !

I also tried to post a regular MVC controller according to the examples and had the same problem.

In any case, I am trying to find a way to tell the extension Do not render aspnetmvc-ajax Do anyone have any suggestions? Thanks in advance ...

MVC extensions are using aspnet-ajax transport settings and they are bound For the DataSourceRequest object, if you use the DataSourceRequest attribute that will handle the binding. Check the controller code.

  Public Performance EditingCustom_Read ([DataSourceRequest] DataSourceRequest Request) {Jason Returns (Session ClientProductRepository.All.) ToDataSourceResult (Request)); }    

No comments:

Post a Comment