Hi , i get this error as a popup while i use serverside request in datatable :
"DataTables warning: table id=datatables5fc37003da5d11 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1"
But my json which the datatable request is receiving is a proper json and as given in the example for datatables :
{"draw":1,"recordsTotal":10,"recordsFiltered":10,"data":[["India","6"],["India","17"],["India","20"],["India","3"],["India","4"],["India","9"],["India","8"],["India","7"],["India","7"],["India","5"]]}
This is my code for initialising the datatable:
\koolreport\datagrid\DataTables::create(array(
"themeBase"=>"bs4",
"serverSide"=>true,
"ajax"=>'eventId=5',
"cssClass"=>array(
"table"=>"table table-striped table-bordered"
),
"dataSource"=>$table_array,
"showFooter"=>true,
"options"=>array(
"order" => [],
"bInfo" => false,
"dom" => 'Bfrtip',
"buttons" => [
'csv', 'excel'
],
"paging"=>count($table_array)>10,
"pageLength"=>10,
"pageIndex"=>0,
)
));
If i don't give $table_array in datasource , i get koolreport error , datasource not defined.
Can you please help with how to achieve server side pagination/sorting etc because my json is perfectly proper as u can see in the example.