Ajax Index Column Error

Ajax Index Column Error

abdulpatrickabdulpatrick Posts: 1Questions: 0Answers: 0
edited January 2014 in DataTables 1.9
I want add an index numbering from ajax in my table.
i have follow this documentation http://datatables.net/examples/api/counter_column.html and it give an error "requested unknown parameter '1' from the data source for row 0".
then i try search some solution in forum and do some googling. i make some modification from documentation like these.
my php:
[code]
$this->load->library('datatables');
$this->datatables->from('lesson');
$this->datatables->select('lesson_name');
echo $this->datatables->generate();
[/code]
my javascript:
[code]var get_jurusan = function (table, url) {
var oTable = $('#'+table).dataTable({
"sPaginationType": "bs_normal",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": url,
"sServerMethod": "POST",
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ -1 ] }
],
"aoColumns": [
{
"sTitle": "Index",
"fnDrawCallback": function ( oSettings ) {
if ( oSettings.bSorted || oSettings.bFiltered )
{
for ( var i=0, iLen=oSettings.aiDisplay.length ; i
This discussion has been closed.