Datatable no displaying data

Viewed 23

I know there are several topics about these but, not of them give an answer.

Here is my code:

script language="javascript">
    
    $(document).ready(function () {
    
        $('#RechargeTable').DataTable({
                "processing": true,
                "serverSide" : true,
                "ajax": {
                    "url": '${ReportAjax}',
                },
                "columns": [
                    { "data": "contrato", "name": "contrato", "autoWidth": false }
                    ]
        });
    });
    
</script>

My table

<table width="100%" align="center" cellspacing="0" border="0"  id="RechargeTable" class="display dataTable nowrap cell-border" >
    <thead>
        <tr>
            <th>contrato</th>
        </tr>
    </thead>
        <tfoot>
             <tr>
                 <th>contrato</th>
             </tr>
        </tfoot>
</table>

and my Json is

{
    "recordsFiltered": 10,
    "data": [
        { "contrato": "ASOCIACION DOMINICANA" },
        { "contrato": "TEOFILO IDALGO"},
        { "contrato": "COMPETENCE MAN"},
        { "contrato": "SOCIADOS C POR A"},
        { "contrato": "INVEA" },
        { "contrato": "ETHIENCE" },
        { "contrato": "PUBL SRL"},
        { "contrato": "Sylvy"},
        { "contrato": "Amaueno" },
        { "contrato": "TERMINACION A"}
    ],
    "draw": 1,
    "recordsTotal": 100000
}

Based on the examples in datatable.net I was supposed to see the data, the JSON brink a 200 response, so why my data do not display

0 Answers
Related