Column Total problem with ColReorder and ColVis in Internet Explorer 8 and below
Column Total problem with ColReorder and ColVis in Internet Explorer 8 and below
I'm having trouble getting a DataTables live view working correctly, but I do have a short screencast showing the problem here: https://dl.dropboxusercontent.com/u/17108802/datatables_bug.avi. Here is the debug output for my table as well: http://debug.datatables.net/epimol.
My problem is that IE 8 and lower is not calculating the total for the correct columns when I either hide a column before it or move it to a different position. This functionality works correctly in later versions of IE as well as Firefox and Chrome.
Here is the code that is calculating the sum:
[code]
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
/* This function finds the column with a header text of 'Quantity' and sets it equal to column number. Allows the dragging on columns. */
var column_number = $('#labels').find("th:contains('Quantity')").index();
// var col_index = this.fnVisibleToColumnIndex($('#labels').find("th:contains('Quantity')").index());
/* data is all of the data in the specified column. column_number+1 is to account for javascript/css differences */
var data = this._('td:nth-child(' + (col_index+1) + ')', {"filter": "applied"});
/* filter_total will get the sum of the column on all pages after filtering */
var filter_total = 0;
for ( var i = 0; i
My problem is that IE 8 and lower is not calculating the total for the correct columns when I either hide a column before it or move it to a different position. This functionality works correctly in later versions of IE as well as Firefox and Chrome.
Here is the code that is calculating the sum:
[code]
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
/* This function finds the column with a header text of 'Quantity' and sets it equal to column number. Allows the dragging on columns. */
var column_number = $('#labels').find("th:contains('Quantity')").index();
// var col_index = this.fnVisibleToColumnIndex($('#labels').find("th:contains('Quantity')").index());
/* data is all of the data in the specified column. column_number+1 is to account for javascript/css differences */
var data = this._('td:nth-child(' + (col_index+1) + ')', {"filter": "applied"});
/* filter_total will get the sum of the column on all pages after filtering */
var filter_total = 0;
for ( var i = 0; i
This discussion has been closed.