How to use fnFooterCallback in FixedColumns?

How to use fnFooterCallback in FixedColumns?

kannanbtech303kannanbtech303 Posts: 1Questions: 0Answers: 0
edited April 2013 in General
This is my datatables script coding.
[code]

$(document).ready( function () {
var oTable = $('#example').dataTable({
"iDisplayLength": 25,
"aLengthMenu": [[25, 50, 75, 100] ,[25, 50, 75, 100]],
"sScrollX": "100%",
//"sScrollXInner": "150%",
"bScrollCollapse": false,
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {

var TotalPF = 0;
var TotalNetsalary = 0;
for ( var i=0 ; i

Replies

  • tabruzzotabruzzo Posts: 2Questions: 0Answers: 0
    I am facing the same issue. Did you find a fix for this? I have a data table and we want to freeze the first two columns and have grand totals at the bottom. The first columns are duplicated, I tried many different attempt s to get around it but all have failed.
  • tabruzzotabruzzo Posts: 2Questions: 0Answers: 0
    please help!
  • haffoudhihaffoudhi Posts: 3Questions: 0Answers: 0
    Hi,
    as i understand, the problem is, when using fixed columns and FnFooterCallback you got repeated columns, my answer is use a counter for this issue.
    For example, you have two fixed columns, declare a global counter var count = 0;
    Than in your fnFooterCallback function put
    count = count + 1;
    if(count>2) {
    // Your function here
    }
This discussion has been closed.