Why is the table empty even though im getting data responce

Why is the table empty even though im getting data responce

pandaomipandaomi Posts: 3Questions: 1Answers: 0
edited April 2015 in Free community support

Im trying to populate a table with an ajax request, after the event fires, i can see in the console the responce i wnat to show, but the table only show the <thead> segment and where the data should be it says: "Proccesing"

tableFoo = $("#tablaExp").DataTable({
            "processing": true,
            "serverSide": true,
            "ajax": function (data) {  // Make the Ajax call ourselves
                $.ajax({
                  url: "http://sae.dev/prestamo",
                  type: "GET",
                  dataType: "json",
                  data: {
                    draw: data.draw,   // Needed for paging
                    start: data.start,    // Needed for paging
                    length: data.length, // Needed for paging
                    func_id:  func_seleccionado
                  },

                })
            },
            "columns": [
                { "data": "first_name" },
                { "data": "salary" }
            ]

        });

Answers

  • pandaomipandaomi Posts: 3Questions: 1Answers: 0

    fix it. i wasnt returning aoColumns, recordsTotal, recordsFiltered from the server, i didnt read the documentation carefully enough

This discussion has been closed.