title: Loading Handsontable from an AJAX-enabled WCF Service
body: <p>I'm trying to display data in a Handsontable from an AJAX-enabled WCF Service but it does not show anything.</p>
  
  <pre><code>CarsService.svc:
  
      [DataContract]
      public class Car
      {
          [DataMember]
          public string Name { get; set; }
  
          [DataMember]
          public string Year { get; set; }
      }
  
      [ServiceContract(Namespace = "")]
      [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
      public class CarsService
      {
          [OperationContract]
          [WebGet(ResponseFormat = WebMessageFormat.Json)]
          public IEnumerable&lt;Car&gt; GetCars()
          {
              var cars = new List&lt;Car&gt;();
              var car1 = new Car()
              {
                  Name = "Kia",
                  Year = "2008"
              };
              var car2 = new Car()
              {
                  Name = "Nissan",
                  Year = "2009"
              };
              cars.Add(car1);
              cars.Add(car2);
              return cars;
          }
      }
  
  WebPage:
  
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script type='text/javascript' src='/Scripts/jquery-1.8.3.js'&gt;&lt;/script&gt;
      &lt;script type='text/javascript' src="/Scripts/Handsontable/jquery.handsontable.js"&gt;&lt;/script&gt;
      &lt;script type='text/javascript' src="/Scripts/Handsontable/bootstrap-typeahead.js"&gt;&lt;/script&gt;
      &lt;script type='text/javascript' src="/Scripts/jquery.contextMenu.js"&gt;&lt;/script&gt;
      &lt;script type='text/javascript' src="/Scripts/jquery.ui.position.js"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" type="text/css" href="/Styles/jquery.contextMenu.css"/&gt;
      &lt;link rel="stylesheet" type="text/css" href="/Styles/Handsontable/jquery.handsontable.css"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
          &lt;script type='text/javascript'&gt;
  
          $(window).load(function () {
  
              $.ajax({
                  url: "/CarsService.svc/GetCars",
                  type: "GET",
                  dataType: "json"
              })
              .success(function (result) {
                  $("#exampleGrid").handsontable("loadData", result);
              })
              .fail(function (r, o) {
                  alert("Failed : " + r.responseText);
              });
          });
          &lt;/script&gt; 
  
          &lt;div id="exampleGrid" class="dataTable"&gt;&lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>