Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Data Table Error :: Cannot read property 'fnSetData' of undefined

Tags:

Initial code looks like this..  var oTable = $('#sim_data').dataTable( {     aoColumns: [ {"sName": "ss" },{"sName": "sim_no"}, {"sName": "sale_price"}, {"sName":   "purchased_price"},{"sName": "status"} ]  }).makeEditable({       .....        }); 

Only when I try to initialize aoColumns as above returns error

Cannot read property 'fnSetData' of undefined 

and with out this initialization it works

like image 586
TED Avatar asked Apr 21 '14 03:04

TED


1 Answers

I had the same problem today. Make sure the number of elements in your "aoColumns" matches the number of columns you actually have in your table.

In my case, that was the problem.

like image 69
donaier Avatar answered Oct 24 '22 22:10

donaier