Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
JSON response not bindable with igGrid ... I am getting crazy ... please help ...
posted

Hi there,

I am getting really crazy ... i tried everything for several days now and i am lost ... i am a newbie ... i know ... but please help me.

I wrote a simple HTML file. I connect to a very simple JSON service on a remote server. If i try with the URL "http://ip.jsontest.com" it works fine but with my own MCF service that also give correct JSON response (i tested it in JSONlint and you can try it your self on "http://extranet.atseven.nl/Freelance365_WS/Contracts.svc/getall") i just get the spinner of the igGrid component. The response of my JSON service is 

{"BirthYear":1970,"FirstName":"Mark","LastName":"Bakker"}
The HTML code i use is:

<!doctype html>

<html>

<head>

    <!-- Infragistics Combined CSS -->

    <link href="Infragistics/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />

    <link href="Infragistics/css/structure/infragistics.css" rel="stylesheet" />

    <!-- jQuery Core -->

    <script src="Scripts/jquery-1.7.1.min.js"></script>

    <!-- jQuery UI -->

    <script src="js/jquery-ui.js" type="text/javascript"></script>

    <script src="Scripts/jquery-ui-1.8.20.min.js"></script>

    <!-- jQuery Templates: http://api.jquery.com/category/plugins/templates/ -->

    <script src="Scripts/jquery.tmpl.min.js"></script>

    <!-- Infragistics Combined Scripts -->

    <script src="Infragistics/js/infragistics.core.js"></script>

    <script src="Infragistics/js/infragistics.dv.js"></script>

    <script src="Infragistics/js/infragistics.loader.js"></script>

    <script src="Infragistics/js/infragistics.lob.js"></script> 

  <script type="text/javascript">

      var data_url = "http://extranet.atseven.nl/Freelance365_WS/Contracts.svc/getall";

      var jsonp = new $.ig.JSONPDataSource({ dataSource: data_url });

      $(function () {

          $("#grid").igGrid({

              width: "1000px",

              dataSource: jsonp,

              autoGenerateColumns: true,

          });

      });

    </script>

</head>

<body>

    <div id="grid"></div>

</body>

</html>

Parents
No Data
Reply
  • 1015
    posted

    Are you sure it is returning a valid JsonP response?  Or is returning straight json?

    JsonP would be needed for cross domain request.

    A jsonp response would be wrapped  callback( {"mydata" : "not here"});

     

     

Children