Quantcast
Viewing all articles
Browse latest Browse all 82132

sDefaultContent, and Requested unknown parameter

Hi,
I am running DataTables on my company IntraNet.
I have a page which handles .csv files (of various composition) and need to build my table on the fly.

I am using the:
aoColumns [ null, null, null, null, null, {"mData":null, "sDefaultContent": "Edit"}]
and
the aaData method for building my table dynamically.

When I do this everything runs fine, except that the number of nulls does not always match my needed fields.

$('#example').dataTable ({
    "aoColumns": myColumns,  //my list This throws the error..

  // "aoColumns:[null,null,null,null,{"mData":null,"sDefaultContent":"Edit"}], 
                   //this works but I can't anticipate the number of columns.
                   //plus it has the ending row value of EDIT in the table.

   "aaData": fieldAttributes, //my list values..
   "sScrollX": "100%",
   "sScrollY": 200,
   bDestroy: true,
   bPaginate: true,
   bFilter: true,
   bAutoWidth:true,
   bSort:true
});

Is there a way to dynamically create the number of 'nulls'?

Andy

Viewing all articles
Browse latest Browse all 82132

Trending Articles