Data Table Error :: Cannot read property ‘fnSetData’ of undefined

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

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.


The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .
Read More:   Convert hyphens to camel case (camelCase)

Similar Posts