Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35271

got Notice: Undefined index: iColumns

$
0
0

I tried to retrieve data from mongodb by using server_processing.php I downloaded from this site. I edit server_processing.php to connect to my mongodb as:

mb_internal_encoding('UTF-8'); $database = 'mydb'; $collection = 'mycollection';

and copied row_detail.html from examples and edited it as:

$(document).ready(function() { var table = $('#example').DataTable( { "bServerSide": true, "processing": true, "ajax": "../server_side/scripts/server_processing.php","dataType": "jsonp", "columns": [ { "class": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { "data": "file_id" }, { "data": "company" }, { "data": "trading_partner" }, { "data": "functional_group" } ], "order": [[1, 'asc']] } );

I got invalid JSON response. Response detail shows Undefined index: iColumns.

I am new to this. Can anyone help me to do a simple retrieve data from server_side using DataTables? Thanks


Viewing all articles
Browse latest Browse all 35271

Trending Articles