title: jQuery Datatables json AJAX help pls "No Data Available in Table"
body: <p>I have a table that is made in the <code>$( document ).ready</code>function. I am also using the jQuery DataTables plugin. For some reason, when the page loads, the table loads but the first row says:</p>
  
  <blockquote>
    <p>"No Data Available in Table".</p>
  </blockquote>
  
  <p>This my controller: </p>
  
  <pre><code>  public string Lowx()
          {
              var query = db.Infoes.
                  Include(x =&gt; x.Profile).
                  Include(x =&gt; x.Car).
  
                  ToList();
  
  return JsonConvert.SerializeObject(query.ToList());
  </code></pre>
  
  <p>This my Ajax function:</p>
  
  <pre><code> $(document).ready(function (data) {
  
            $('#cars').DataTable({
  
  
                ajax: {
                    url: '@Url.Action("lowx")',
                    type: 'POST',
                    dataType: 'json',
                    dataSrc: ""
  
                },
                columns: [
                    { data: "FirstName", name: "FirstName" },
                    { data: "LastName", name: "LastName" },
                    { data: "MiddleName", name: "MiddleName" },
                    { data: "BirthDate", name: "BirthDate" },
                    { data: "CarName", name: "CarName" },
                    { data: "CarNumber", name: "CarNumber" },
  
                ],
  
  
  
  
      });
  });
  </code></pre>
  
  <p>Datatables write:</p>
  
  <p><img src="https://i.stack.imgur.com/LsTEi.jpg" alt="enter image description here"></p>