I suggest you ...

Make Kendo DataSource Compatible with ASP.NET MVC 4 Web API

If possible, please consider making the Kendo DataSource compatible with the data returned from using an ASP.NET MVC 4 Web API project possibly by adding a 'webapi' dataType.

712 votes
Sign in
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Vesselin ObreshkovVesselin Obreshkov shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


    Sign in
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      • Brian WattsBrian Watts commented  ·   ·  Flag as inappropriate

        I've been doing Microsoft programming since the classic ASP days.. but am fairly new to MVC. I just built out an MVC 4 app using jqGrid and WebAPI.. I am wanting to do a drop-in replacement of jqGrid and put a Kendo UI Grid in it's place. Is this possible?

      • Stephen ByrneStephen Byrne commented  ·   ·  Flag as inappropriate

        Yes please, please include "out of the box" support for Web API, don't care about OData just want a proper MVC helper for the grid that will behave correctly out of the box.
        Have spent the last 3 days faffing about and reading virtually every article on the support site just to get basic functionality working with Web API. You end up having to copy and paste swathes of code from different sources which you may or may not be lucky enough to find without having to read the entire forums....

      • Vesselin ObreshkovVesselin Obreshkov commented  ·   ·  Flag as inappropriate

        Well considering they've added full oData support now maybe you guys can close this (and give me back my votes :)? Even without oData you can easily implement whatever is needed.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        Kendo already has an odata source. It is straight forward to adapt (i.e. copy the odata.js file) and make it work properly with Web API... except for one thing: They need to provide a flag that will enduce Deletes to be passed in the URL instead of in the body. They need to do this for not just Web API but anything hosted on Amazon and google as well, because you must use the URL for these services just like Web API requires it in the URL too.

        So for those of you that are looking for Kendo to fix this, just use what they already give and make minor tweaks to their code for odata and your'e good to go. I already have one done.

      • JasonJason commented  ·   ·  Flag as inappropriate

        Looking at it the wrong way Kendo UI is supposed to be back end agnostic my understanding a .NET shim should be provided for Web API perhaps by the community. The future is building the front end in JavaScript which needs to be standardised across browsers and backend my understanding is it already is in Kendo UI. No votes from me.

      • Wayne BrantleyWayne Brantley commented  ·   ·  Flag as inappropriate

        More appropriate, this should be called - implement easy and direct standards based REST support for your datasource, which a grid then uses, etc.

        If they do that, then Web API should be fine as it is just a REST framework.

      • Pinaki MukherjeePinaki Mukherjee commented  ·   ·  Flag as inappropriate

        I am also trying to instigate webapi data in KendoUI grid. But i fail to do that . I am also wasting my 3 days in this R&D. It will be great if it will possible. Please give some solution with well documentation and DEMO.

      • DavidDavid commented  ·   ·  Flag as inappropriate

        This would be a really, really great feature to have that I would love to use!

      • AngeloAngelo commented  ·   ·  Flag as inappropriate

        I've asked my boss o buy a licence but for new projects web api support is very very important. Thanks for consider this.

      • KenKen commented  ·   ·  Flag as inappropriate

        This is the reason I propsed the Kendo Grid to my client! I am trying to make it easy for their developers to pick up what I code for them.

      • Anonymous commented  ·   ·  Flag as inappropriate

        Thank you for considering this. I think that including this feature would be very helpful.

      • MatMat commented  ·   ·  Flag as inappropriate

        @Anonymous: 8 days ago they reverted the fix you mentioned, and we're back to jQuery including the request body and forcing you to manually specify data on the request URI. So, um, technically not a bug then.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        There's some good news on this front: http://bugs.jquery.com/ticket/11586

        While Kendo wasn't willing to fix the obvious bug in JQuery themselves, jQuery agrees with me and is fixing it. It may not get into 1.8 of jQuery but it will be fixed.

        That should tell Kendo that it's a real bug and Kendo should be fixing it themselves. With the exception of the DELETE issue I have a fully working datasource extender that works similiarily to the odata one for WebAPI.

        Note that the final version of WebAPI likely will return results differently than even the RC because they're putting in full oData support and returning an array as they do as the root of the json has a serious javascript security issue so it likely will result in a {results: []} type structure, but once you have this datasource extender it doesn't matter because it's one line to change it to look in the right spot.

      • YaronYaron commented  ·   ·  Flag as inappropriate

        I agree with James.
        The documentry is very missing.
        It lacks details like - When the events are being called? Only once or everytime? etc.
        For template there are few examples but no documentation that describes all the possibilities.
        WebApi support is VERY important.

      • James HancockJames Hancock commented  ·   ·  Flag as inappropriate

        FYI, while the blog entry is helpful, it brings up a major issue which is the magic methods on the datasource. It needs to be MUCH better documented and there needs to be events for when a filter, sort, or page is requested so that we can intercept and override what occurs (and tell it how to parse the responses too).

        Right now I feel like it's a black box, even after reading all of the documentation, seeing the demos and watching the video.

        For those of you that want a very seamless solution, check in the forums. I posted code that allows you to post as json, enable server side sorting, filtering, and paging, and get back a response that doesn't require custom parsing.

        I also posted instructions on how to enable $select functionality so that you can now do projections as well with Web API and Kendo will handle them properly.

        And it's built in such a way that when MS does update the stack to support $select, it's removal of one method. When they do support a true odata json response set, it's removal of another method and find and replace to tell Kendo to use OData instead.

        Other solutions require every method have a special signature etc. which doesn't cut it considering how much this is changing and how quickly.

      • James HancockJames Hancock commented  ·   ·  Flag as inappropriate

        Web API doesn't use OData. SPA enables partial OData through the IQueryable interface. As I've been reminded by MS people in the last few days this support is in the highly Alpha SPA not in Web API.

        Although the writing is on the wall that RIA Services is dead and this is the approach going forward.

        Unfortunately SPA's OData doesn't support $select right now so it's largely useless for listing data. :<

        I'm working on a solution that will do this automatically though and give it $select.

        According to support, it mostly works with the current OData in SPA... I'm trying it out today.

      ← Previous 1

      Feedback and Knowledge Base