So here's the thing, I have two datatables side by side and I nedd to add items(rows) from Table A to Table B.
'Before' datatable I was doing all right using append:
function add(num)
{
...
$("#myDiv1 tr#p"+num).appendTo("#myDiv2");
...
}
Of course this doesn't work with datatables since does not update the table, and I can't seem to get It working using datatables functions, my code goes like the following but isn't working at all:
function add()
{
...
stockTable = $('#stocktable').dataTable();
catalogTable = $('#catalogtable').dataTable();
var trdata = stockTable.fnGetData($(this).closest('tr'));
stockTable.fnDeleteRow($(this).closest('tr'));
catalogtable.fnAddData(trdata);
...
}
Help appreciated!