Grid UrlAdaptor

Hi,

I have some trouble to use the UrlAdaptor to get remote data. 
I make a very simple test to retrieve data:

<code>
var data = new ej.data.DataManager({
    url: 'http://localhost:8086/portail/jsp/tst_synch_edit_donne.jsp',
    adaptor: new ej.data.UrlAdaptor(),
    offline:true
})
var grid = new ej.grids.Grid ({
    dataSource: data
});
grid.appendTo('#Grid');
</code>

Doing this, I got the following error : 


Even if it seems like I retrieve tha data when I check the dataManager object:
 
Do you have a clue to resolve this problem?

Thanks.


1 Reply 1 reply marked as answer

BS Balaji Sekar Syncfusion Team November 19, 2020 03:32 AM UTC

Hi ALVES, 

Greetings from the Syncfusion Support. 

When we define offline as true in the UrlAdaptor, it will return the whole data with JSON objects format. 

We have created a sample with defined offline property in the UrlAdaptor so, please refer the below code example and sample for more information. 

[index.cshtml] 
    ej.base.enableRipple(true); 
    var dataM = new ej.data.DataManager({ 
        url: "Home/UrlDatasource", 
        adaptor: new ej.data.UrlAdaptor(), 
        offline: true 
    }) 
 
    var grid = new ej.grids.Grid({ 
        dataSource: dataM, 
        allowPaging: true, 
        columns: [ 
       .      .       .      . 
        ] 
    }); 
    grid.appendTo("#Grid"); 
  

Please get back to us, if you need further assistance. 

Regards, 
Balaji Sekar 


Marked as answer
Loader.
Up arrow icon