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

Kendo MVC Grid, WebApi, and OData

7 Answers 682 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 20 Aug 2012, 12:13 PM
Hello,



Last week, Microsoft put out an OData media formatter for WebApi, meaning that you should be able to both use built-in WebApi support for OData query methods, AND produce OData format output.



I have my feed, I have a Razor-produced MVC Grid on the page, and I have it making the request through .Read(read => read.Url(TheUrlToMyApi)). Now I just need to get it to understand OData. How do I go about settings the Transport, as there doesn't appear to be an option in the GridHelper.



Thanks!

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 20 Aug 2012, 02:18 PM
Hi Robert,

 Currently Kendo UI Complete for ASP.NET MVC does not support WebAPI controllers. You may cast your vote for the logged feature request here: http://feedback.kendoui.com/forums/127393-kendo-ui-feedback/suggestions/2667632-make-kendo-datasource-compatible-with-asp-net-mvc- 


 On a side note could you please give us some links about the OData media formatter? They would be of help when we decide to add WebAPI support.

Kind regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Robert
Top achievements
Rank 1
answered on 20 Aug 2012, 02:23 PM
Yes, you can read about it here. http://blogs.msdn.com/b/alexj/archive/2012/08/15/odata-support-in-asp-net-web-api.aspx?CommentPosted=true



So does the MVC grid support using OData sources? Because I can get it to make the proper request to the WebApi controller, I just can't get it to parse the XML or ask for JSON.
0
Atanas Korchev
Telerik team
answered on 21 Aug 2012, 06:53 AM
Hello Robert,

 No, the MVC grid cannot consume OData data sources. However the client-side only version does: http://demos.kendoui.com/web/grid/remote-data.html 

 Thank you for providing this link! We will have it in mind when we start implementing the WebAPI support.

Greetings,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Vincent
Top achievements
Rank 1
answered on 07 Sep 2012, 01:34 PM
What does the MVC Grid consume then? How can you set the MVC Datasource type to "json" or "odata"?
The WebApi returns oData now (since 15th of August) but the Grid is not able to use it, please explain why.
0
Atanas Korchev
Telerik team
answered on 10 Sep 2012, 07:19 AM
Hi,

 The Kendo Grid for ASP.NET MVC currently does not support WebAPI controllers. It ca be bound to an action method which returns json. You can find more info in our documentation: http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/ajax-binding 

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sean
Top achievements
Rank 1
answered on 27 Dec 2012, 09:08 PM
Are there any plans to add support for WebAPI controllers in the future?  It would be nice to be able to re-use my REST controllers for a kendo UI...

0
Atanas Korchev
Telerik team
answered on 28 Dec 2012, 07:22 AM
Hi,

 WebAPI controllers are supported even now. Please check this blog post about the Kendo UI and WebAPI support: http://www.kendoui.com/blogs/teamblog/posts/12-11-29/the_facts_on_using_kendo_ui_with_asp_net_webapi.aspx

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