javascript error with multiple rows in a footer

javascript error with multiple rows in a footer

bjenkinsbjenkins Posts: 5Questions: 0Answers: 0
edited September 2009 in Bug reports
i was getting this javascript error using DataTables 1.5.1 when my had multiple elements:

Error: oSettings.aoColumns[i] is undefined
Source File: jquery.dataTables.js
Line: 2175

here's the code around there:
[code]
/* Cache the footer elements */
var nTfoot = oSettings.nTable.getElementsByTagName('tfoot');
if ( nTfoot.length !== 0 )
{
iCorrector = 0;
var nTfs = nTfoot[0].getElementsByTagName('th');
for ( i=0, iLen=nTfs.length ; i

Replies

  • allanallan Posts: 56,837Questions: 1Answers: 9,035 Site admin
    Hi Brent,

    Thanks for posting your code! The trick here is that this will likely break the show/hide columns future of DataTables. That function wasn't really built with multiple TR elements in mind for the footer, although I can certainly see the advantage. I've added support for this to my to do list...

    Regards,
    Allan
This discussion has been closed.