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

DataSourceRequest with Web API

3 Answers 512 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Iron
Joel asked on 25 Nov 2015, 11:58 PM

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

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 26 Nov 2015, 08:57 AM
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
0
Joel
Top achievements
Rank 1
Iron
answered on 30 Nov 2015, 03:28 PM

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

0
Rosen
Telerik team
answered on 02 Dec 2015, 08:20 AM

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
Tags
General Discussions
Asked by
Joel
Top achievements
Rank 1
Iron
Answers by
Atanas Korchev
Telerik team
Joel
Top achievements
Rank 1
Iron
Rosen
Telerik team
Share this question
or