FixedColumns Example Issue
FixedColumns Example Issue
citizenjkl
Posts: 9Questions: 0Answers: 0
Hello:
I'm new to DataTables and very excited by what I see. I tried to use the example shown on this page:
http://www.datatables.net/release-datatables/extras/FixedColumns/x_y_scrolling.html
and bumped into the issue you see in the example. The Rendering Engine Column has the index data too.
I don't yet know how to resolve myself. Can you help me?
Thanks!
John
I'm new to DataTables and very excited by what I see. I tried to use the example shown on this page:
http://www.datatables.net/release-datatables/extras/FixedColumns/x_y_scrolling.html
and bumped into the issue you see in the example. The Rendering Engine Column has the index data too.
I don't yet know how to resolve myself. Can you help me?
Thanks!
John
This discussion has been closed.
Replies
Sorry about that - it is most certainly a bug in the example. It is trying to update the first column in the table, but since the first column is hidden, it is updating the wrong column after the first draw!
Rather than using fnDrawCallback, the example should be using fnPreDrawCallback (to modify the data before FixedColumns updates the fixed column). This is what the function should look like:
[code]
"fnPreDrawCallback": function ( oSettings ) {
/* Need to redo the counters if filtered or sorted */
if ( oSettings.bSorted || oSettings.bFiltered ) {
for ( var i=0, iLen=oSettings.aiDisplay.length ; i