Hi,
i have two of the awesome Datatables:
This works fine. When i do some Updates, i want to reload the UserTable.
I do
Seems like, it is trying to load the Data into the "UserTable" instead into the "UserHistoryTable" but i have no clue what is wrong with my code.
i have two of the awesome Datatables:
var table = $('#UserTable').DataTable( { ajax: "/ajax/admin/getusertable/datatable", "aoColumns": [ { "mData": "username"}, { "mData": "email"}, { "mData": "state"}, { "mData": "note"}, { "mData": "created_at"}, { "mData": "updated_at"}, ] } ); var historytable = $('#UserHistoryTable').DataTable( { "aoColumns": [ { "mData": "key"}, { "mData": "old_value"}, { "mData": "new_value"}, { "mData": "user_id"}, { "mData": "updated_at"} ] } );
This works fine. When i do some Updates, i want to reload the UserTable.
I do
table.ajax.reload();this also works fine. But then i want to load the "historytable" with a new Datasource
historytable.ajax.url( "/ajax/getusrhstry/" + id ).load();This results in error throwing
"DataTables warning: table id=UserTable - Requested unknown parameter 'username' for row 0."and destroy my UserTable.
Seems like, it is trying to load the Data into the "UserTable" instead into the "UserHistoryTable" but i have no clue what is wrong with my code.