FixedColumns Example Issue

FixedColumns Example Issue

citizenjklcitizenjkl Posts: 9Questions: 0Answers: 0
edited February 2012 in Bug reports
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

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Hi John,

    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
This discussion has been closed.