We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

DataGrid WebApiAdaptor Server side

Hello. I'm trying to use Ej Js Grid with RESTful WebApi backend implemented in AspNetCore.
As I can see there are WebApiAdaptor and UrlAdaptor.
UrlAdaptor is backed by server side class DataManager which can be instantintiated from passed json object and handles all the sorting, paging and filtering which is very nice. The problem is that UrlAdaptor uses POST-typed request for all purposes which is not compatible with REST paradigm.
WebApiAdaptor on the other side follows REST convention but it passes filtering, sorting and paging parameters in the query string as GET request obviously doesn't support request body.

The question is - is there any conveniet way to instantinate server-side DataManager from query string?

1 Reply

KK Karthick Kuppusamy Syncfusion Team November 14, 2016 01:16 PM UTC

Hi Anton, 

Thanks for Contacting Syncfusion support. 

Please find the response for your queries. 

Query #1: the problem is that UrlAdaptor uses POST-typed request for all purposes which is not compatible with REST paradigm.
WebApiAdaptor on the other side follows REST convention but it passes filtering, sorting and paging parameters in the query string as GET request obviously doesn't support request body.
 
                       
  Odata query like $skip,$take is not supported dataManager url adaptor.This is default behavior.                  
 
Query #2: The question is - is there any conveniet way to instantinate server-side DataManager from query string?  
 
Please find the work around for the above requirement. 
 
 
var getC = new ej.UrlAdaptor().extend({ 
            init: function () { 
                this.options.requestType = ''; 
            } 
        }); 
 
$(function  ){ 
  Data = getC() 
} 
 
 
Regards, 
K.Karthick. 


Loader.
Live Chat Icon For mobile
Up arrow icon