This is a migrated thread and some comments may be shown as answers.

[Solved] Grid with OData $batch query

3 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 07 Apr 2015, 05:49 PM

Hello everyone!

 

I am using KendoUI Grid with OData WebApi and from a few weeks until now I am getting the URI too long exception. The root cause of this error is because one of my columns reference another table with a tree structure, and in order to filter this column the user can select the nodes in the tree to filter for. As the tree got bigger and he tried to select too many nodes the URI generated got too big.

My first shot was change web.config parameters to increase the size of the querystring but this did not solved the problem.

My second shot was to look how can I use POST verb in my OData read operations, then I ended up with the $batch processing and I changed my webapi to support it. The problem is that I cant make KendoUI work with it, I already changed the "batch" property to true but it keeps sending GET requests.

What can I do in this case? Does SignalR have this problem? 

Reference: 

http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits
https://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxquerystringlength%28v=vs.110%29.aspx
http://www.odata.org/documentation/odata-version-3-0/batch-processing/
http://blogs.msdn.com/b/webdev/archive/2013/11/01/introducing-batch-support-in-web-api-and-web-api-odata.aspx 

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 10 Apr 2015, 06:25 AM
Hello Ron,

At the time being Kendo UI 's OData support doesn't support the $batch specification.

What you could try as an alternative is to use POST for the transport.read operation. 

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ron
Top achievements
Rank 1
answered on 10 Apr 2015, 11:57 AM

Hello Atanas,

I already tried to change the transport.read to POST but looks like ODataController from WebApi does not support this because it is not part of OData pattern.

But anyways, I could be doing this wrong, do you have a working sample with Kendo UI Grid + OData WebApi + POST reads?

Thanks.

0
Atanas Korchev
Telerik team
answered on 13 Apr 2015, 10:06 AM

Hello Ron,

No, we don't have such an example. I think you are right that the ODataController doesn't support POST reads. A possible workaround is to use a regular ApiController without OData. You can then use the Kendo.DynamicLinq library to do the paging, sorting, etc.

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Ron
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Ron
Top achievements
Rank 1
Share this question
or