fnUpdate on 2 datatable (solved)

fnUpdate on 2 datatable (solved)

madmikemadmike Posts: 30Questions: 4Answers: 0
edited May 2013 in General
I'm using 2 datatable on the same display, and in jeditable i'm using the callback to get data using fnGetPosition :

class table is in both datatable.
[code]
var aPos = $('.table').dataTable().fnGetPosition( this );
[/code]

In the first datatable aPos = [0, 1, 1] (example of the 1st column)
In the seconde datatable aPos = [0, null, -1] (example of the 1st column)

And off course, I get this error message : Uncaught TypeError: Cannot call method 'fnSetData' of undefined

What's I forgot ?
Thanks for your help,
Mike

Replies

  • madmikemadmike Posts: 30Questions: 4Answers: 0
    Ok i found the solution :

    Use :
    [code]var tableId = $(this).closest('table').attr('id');[/code]

    Before :
    [code]var aPos = $('#' + tableId ).dataTable().fnGetPosition( this );[/code]

    It can help ;-)
This discussion has been closed.