Kendo MVC Grid, WebApi, and OData

8 posts, 0 answers
  1. Robert
    Robert avatar
    38 posts
    Member since:
    Feb 2012

    Posted 20 Aug 2012 Link to this post

    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!
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 20 Aug 2012 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Robert
    Robert avatar
    38 posts
    Member since:
    Feb 2012

    Posted 20 Aug 2012 Link to this post

    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.
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 21 Aug 2012 Link to this post

    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!
  6. Vincent
    Vincent avatar
    1 posts
    Member since:
    Sep 2012

    Posted 07 Sep 2012 Link to this post

    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.
  7. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 10 Sep 2012 Link to this post

    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!
  8. Sean
    Sean avatar
    5 posts
    Member since:
    Feb 2012

    Posted 27 Dec 2012 Link to this post

    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...

  9. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 28 Dec 2012 Link to this post

    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!
Back to Top
UI for ASP.NET MVC is VS 2017 Ready