DataSourceRequest with Web API

4 posts, 0 answers
  1. Joel
    Joel avatar
    16 posts
    Member since:
    Feb 2015

    Posted 25 Nov 2015 Link to this post

    I'm using ASP.NET Web API 5.2.3, and I'm having problems getting the DataSourceRequest to work properly.  I followed the instructions at http://docs.telerik.com/kendo-ui/web/grid/how-to/web-api-server-operations but it appears paging and filtering options are not coming through with the request.  Is the information on that page still valid for current releases?

    Thanks,

    Joel

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 26 Nov 2015 Link to this post

    Hello,

    Yes, those instructions are still valid. Perhaps you have missed some configuration option - check whether the type option of the data source and the schema are set as in the example. You can also check the sample project linked in the help article.

    Regards,
    Atanas Korchev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Joel
    Joel avatar
    16 posts
    Member since:
    Feb 2015

    Posted 30 Nov 2015 in reply to Atanas Korchev Link to this post

    It's working now.  I may have fell victim to request caching in my browser.  I was previously using MVC for the DataSource, which apparently uses a POST for the request parameters.  I changed to Web API, but last week the parameters were still being sent in a POST.  When testing today, the request is sent as a GET and all parameters are getting through.  I assume the different request types for DataSource (POST for MVC and GET for Web API) is by design?

    Thanks,

    Joel

  5. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 02 Dec 2015 Link to this post

    Hello Joel,

     

    Indeed, this is by design. The WebApi (being a REST service) is set to handle the GET verb for data fetching. Thus, this is why in this case, the GET verb is used instead of POST.

     

    Regards,
    Rosen
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready