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.
Unfortunately, activation email could not send to your email. Please try again.

DataGrid WebApiAdaptor Server side

Thread ID:

Created:

Updated:

Platform:

Replies:

127385 Nov 11,2016 06:02 AM Nov 14,2016 08:16 AM JavaScript 1
loading
Tags: ejGrid
Anton E
Asked On November 11, 2016 06:02 AM

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?

Karthick Kuppusamy [Syncfusion]
Replied On November 14, 2016 08:16 AM

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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;