NaN sInfo _TOTAL_ dataTable jquery / JSON

0

I have a problem in return of JSON in the variable TOTAL that returns NaN is strange because the problem was in the END variable I removed and added END again and returned to normal but, started the NaN in the TOTAL variable. Can anyone help?

$(document).ready(function() {
   oTable = $("#grid").dataTable({
      "bProcessing": true,
      "bServerSide": true,         
      "bPaginate": true,
      "iDisplayLength": 25,
      "sPaginationType": "full_numbers", 
      "sAjaxSource": urlAjaxSource,
      "oLanguage": {
          "sSearch": "Procurar:",
      "sLengthMenu": "Exibir _MENU_ itens por página",
      "sZeroRecords": "Nenhum registro encontrado.",
      "sInfo": "Exibindo _START_ a _END_ de _TOTAL_ itens"//onde acontece o erro _TOTAL_
    }
    });
});
    
asked by anonymous 28.05.2014 / 19:30

1 answer

1

Your Json needs to return this structure below so that the dataTables assumes the correct totals values:

{
  "draw": 1,
  "recordsTotal": 57,
  "recordsFiltered": 57,
  "data": [
    { [...]

If it still does not fix a piece of your json so we can evaluate it better.

    
29.05.2014 / 14:11