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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid not loading remote JSON at all

Thread ID:

Created:

Updated:

Platform:

Replies:

127005 Oct 20,2016 02:23 PM UTC Oct 21,2016 12:09 PM UTC JavaScript 1
loading
Tags: ejGrid
AlighaThor
Asked On October 20, 2016 02:23 PM UTC

Hello. First of all, I wish to say thanks for creating a wonderful plattform. Well, I have been the all day trying to load a remote JSON data into the Grid control, without success. According to the Documentation of Essential JS, I've included the CDN references for quick testing purposes:

<link rel="stylesheet" rel='nofollow' href="http://cdn.syncfusion.com/13.2.0.29/js/web/flat-azure/ej.web.all.min.css" />

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://cdn.syncfusion.com/js/assets/external/jquery.easing.1.3.min.js"> </script>
<script src="http://cdn.syncfusion.com/js/assets/external/jquery.globalize.min.js"></script>
<script src="http://cdn.syncfusion.com/js/assets/external/jsrender.min.js"></script>
<script src="http://cdn.syncfusion.com/13.2.0.29/js/web/ej.web.all.min.js"> </script>

My problem is that the following code does not worked for me while trying to request a JSON data:

 $(function () {
            var dataManager = ej.DataManager({
                url: 'http://localhost:6900/home/getjson',
                crossDomain: true
            });

            $('#Grid').ejGrid({
                dataSource: dataManager,
                allowPaging: true
            });
        });

I'm using ASP 4.5 MVC 4 on the server. At the beginning I thought that my JSON response was incorrect, but it is not. It's ok. I also tested with the Python's Web2py Framework (I'm primary a python developer) and the problem is the same: not rows at all.

So, can you please clarify me the correct process of loading JSON AJAX requests with the Grid control? I followed the example in the docs with the Northwind database:

http://mvc.syncfusion.com/Services/Northwnd.svc/Orders

But this request returns an XML if im correct, no? So, I'm lost :(

Thanks and good day!

Ragavee U S [Syncfusion]
Replied On October 21, 2016 12:09 PM UTC

Hi Aligha, 

Thanks for your interest in Syncfusion products. 

We analyzed the code examples that you have shared. By default, if the url property of the ejDataManager is used to bind data to grid, the url is considered as a Odata service. If you would like to fetch data from a custom action of controller, then we suggest you to use the URL adaptor concept of the DataManager. 

Please refer to the below online documentation in which we have explained in detail on the various data binding concepts to grid. 




We have prepared a grid sample with URL adaptor binding, which can be downloaded from the below location. 


Regards, 
Ragavee U S. 


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.

Warning Icon 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.Close Icon

;