ColVis with fnRowCallback

ColVis with fnRowCallback

whoopeswhoopes Posts: 9Questions: 0Answers: 0
edited February 2013 in General
Hello All!

Looking for some creative feedback/help. I've got a datatable where I am using bVisible:false and fnrowcallback to change the content of what shows up ($('td:eq(16)', nRow).html(..)). --16 being the column rendered, not the data column (aData). This works great until you enable ColVis. When choosing to hide or show certain columns, it seems like the content altered in fnrowcallback gets place exactly where it was supposed to.

I guess what I need to figure out is how to update rendered data ($('td:eq(16)', nRow).html(..)) when the index changes. So if using ColVis and column 15 was hidden by the user, the following:

"fnRowCallback": function (nRow, aData, iDisplayIndex) {
$('td:eq(16)', nRow).html(..)
}

would become:

"fnRowCallback": function (nRow, aData, iDisplayIndex) {
$('td:eq(15)', nRow).html(..)
}


What am I missing?

Replies

This discussion has been closed.