fnRowCallback Being Applied to Multiple Rows

fnRowCallback Being Applied to Multiple Rows

JanuszJasinskiJanuszJasinski Posts: 36Questions: 0Answers: 0
edited July 2013 in General
I'm using a complex header with serverside data retrieval. My jQuery is [code]
$(document).ready(function () {
var oTable = $('#example').dataTable({
"bProcessing": true,
"bScrollCollapse": true,
"bSort": false,
"bServerSide": true,
"sAjaxSource": "data.asp",
"sServerMethod": "POST",
"sScrollX": "100%",
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
$('td:eq(3)', nRow).html('' + aData[3] + '');
return nRow;

},
"fnInitComplete": function () {
new FixedColumns(oTable, {
"iLeftColumns": 3,
"sHeightMatch": "auto"
});
}
});
});
[/code] As you can see, the first 3 columns are fixed/static. I have an additional 24 columns after this (which can scroll horizontally). As it's serverside retrival with sensitive information, I can't easily upload an example.

What happens is that the first 4 columns after the 3 static ones, all have the fnRowCallback applied to it! Not just the single one that I want. here's the table code [code]


Number
Age
Code
01
02
03
04
05
06
07
08
09
10
11
12



AC
TC
AC
TC
AC
TC
AC
TC
AC
TC
AC
TC
AC
TC
AC
TC
AC
TC
AC
TC
AC
TC
AC
TC








[/code]

Replies

  • JanuszJasinskiJanuszJasinski Posts: 36Questions: 0Answers: 0
    edited July 2013
    It seems to happen when I add [code]"bServerSide": true,
    "sAjaxSource": "data.asp",
    "sServerMethod": "POST",[/code]

    If I use static data, it's fine. Also if I remove the following, it works as well [code]"fnInitComplete": function () {
    new FixedColumns(oTable, {
    "iLeftColumns": 3,
    "sHeightMatch": "auto"
    });
    }[/code]
  • JanuszJasinskiJanuszJasinski Posts: 36Questions: 0Answers: 0
    edited July 2013
    I used fnCreatedRow and it seemed to have resolved the issue
This discussion has been closed.