fnUpdate on 2 datatable (solved)
fnUpdate on 2 datatable (solved)
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
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
This discussion has been closed.
Replies
Use :
[code]var tableId = $(this).closest('table').attr('id');[/code]
Before :
[code]var aPos = $('#' + tableId ).dataTable().fnGetPosition( this );[/code]
It can help ;-)