Multiple table w/ addrow and deleterow functions

Multiple table w/ addrow and deleterow functions

foimystfoimyst Posts: 10Questions: 0Answers: 0
edited March 2010 in General
Sorry if repost.... I couldn't get this... It took me a whole day but nothing works... read some of the post on this forum still I can't do it... I do think Im a slow learner... Please HELP me

Sample table(both table1 and table2) should look something like:
Name
ImANoob moveToTable1

I think the algorithm is like this..
[code]
var oTable;;
$(document).ready(function() {
oTable = $('.dataTable').dataTable();
} );

/* Add a click handler for the delete row */
$('#moveToTable2').click( function() {
oTable.dataTableExt.iApiIndex=0;
var nTr = oTable.fnGetData(this);
oTable.fnDeleteRow( nTr );
oTable.dataTableExt.iApiIndex=1;
oTable.fnAddRow( nTr );
} );
[/code]
This discussion has been closed.