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

Data Manager

I'm having trouble setting up a grid with a remote data source.  I'm trying to use a DataManager with a UrlAdaptor.  The UrlAdaptor keeps making the ajax call as a POST not a GET.  Looking at the adaptors.js file in my nod_modules I can see that UrlAdaptor.prototype.processQuery looks at the request type in the options it inherits from Adaptor.  I've tried extending UrlAdaptor and changing the request type to something other than json which allows then makes the call as a Get but this seems to cause and issue later on in UrlAdaptor.prototype.processResponse when it tries to parse requests.data but data is then undefined even though my response data is stored in the separate data object.


My DataManager calls my API correctly if use a WebApiAdaptor but then it doesn't pass any of the DataRequest parameters I need to do paging and filtering.  How can I make the UrlAdaptor work for me?

1 Reply

PS Pavithra Subramaniyam Syncfusion Team February 20, 2019 12:01 PM UTC

Hi Rebecca, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your query. We could see that you would like to have “GET” request method for “UrlAdaptor”, we would like to inform you that using the “GET” will be very difficult to form a request url with all the paging and filtering query strings. As a filter like excel filter will generate complex query object(which includes predicates, queries), so if “GET” is used for “UrlAdaptor”, then large url will be generated for the request and it is very difficult to handle these. As we could see that you try to bind paging and filtering query with DataManagerRequest, using a “UrlAdaptor” with “POST” is the proper way. 
 
So we suggest you to use the “UrlAdaptor” with “POST” request to achieve your requirement. 
 
Please get back to us if you need further assistance. 
 
Regards, 
Pavithra S. 


Loader.
Live Chat Icon For mobile
Up arrow icon