Cannot read property 'aoColumns' of null

Cannot read property 'aoColumns' of null

alexo31alexo31 Posts: 3Questions: 0Answers: 0
edited April 2014 in Plug-ins
Hello,

I'm a newbie with DataTables, and I've truble with ColReorderWithResize.js. This error occured during DataTables() initialization:
Uncaught TypeError: Cannot read property 'aoColumns' of null (ColReorderWithResize.js:524)

Everything work fine: datable work fine (search, pagination ...), I can change columns order and resize it.

This is how I initialize my table:


$('.dataTable').each(function(){

$(this).dataTable({
/* French labels */
"oLanguage" : {
"sUrl" : "js/vendors/jquery-plugins/jquery-datatable/datatable.french.txt"
},
/* set pagination style */
"sPaginationType" : "bootstrap",
/* set columns sortable and resizable */
"sDom": "Rlfrtip",
/* sort data by its 2nd column */
"aaSorting": [ [1,'asc'] ]
});
});


And this is my html table:





TABLE MNR
Smegma
Tenesme




1
Ktapulte
Qlture


2
KparK
Qcuxklan






Anybody know how to solve this error ?

Thank's

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Does it work without ColReorderWithResize? It is not a supported plug-in that and has major issues. Its also hugely out of date and I'd be surprised if it works with the latest DataTables.

    Allan
  • alexo31alexo31 Posts: 3Questions: 0Answers: 0
    Thank's for your fast answer.

    If I remove ColReorderWithResize.js (and "sDom": "Rlfrtip" in constructor), i have another error:

    Uncaught TypeError: Cannot read property '_iDisplayStart' of null (datatables.bootstrap.js:25)
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Can you link to the page so I can check what is going wrong then? I don't really have a clue at the moment! :-)

    Allan
  • alexo31alexo31 Posts: 3Questions: 0Answers: 0
    I can't, this is not an online project :s
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Sorry, I can't offer any help in that case, as I don't know what the problem is. I'd be guessing and I don't even know where to start at the moment.

    Allan
This discussion has been closed.