rowReordering plugin - multiple tables, only first table works correctly. New records don't reorder
rowReordering plugin - multiple tables, only first table works correctly. New records don't reorder
I really love the rowReordering plugin and want to use it, but am having trouble getting it to work on multiple tables on a single page. I have two tables:Table1 and Table2. Table1 rowreordering works great; Table 2 rowreordering is very goofy and sometimes moves rows but not where you expect and many times does not. Can I use this plugin on multiple tables on the same page? Here is my trimmed down initialization that does not seem to work for TableId2:
[code]
$(document).ready(function() {
oTable1 = $('#TableId1').dataTable( );
oTable2.rowReordering();
oTable2 = $('#TableId2').dataTable( );
oTable2.rowReordering();
});
[/code]
Also, as a separate issue: I am using code to add and delete records and have noticed that even if I have just one table on page, rowreordering works great for only "existing" records loaded from database. Once I add new records, they cannot be moved. Is there a way I can make this work, too?
Any help would be much appreciated!
[code]
$(document).ready(function() {
oTable1 = $('#TableId1').dataTable( );
oTable2.rowReordering();
oTable2 = $('#TableId2').dataTable( );
oTable2.rowReordering();
});
[/code]
Also, as a separate issue: I am using code to add and delete records and have noticed that even if I have just one table on page, rowreordering works great for only "existing" records loaded from database. Once I add new records, they cannot be moved. Is there a way I can make this work, too?
Any help would be much appreciated!
This discussion has been closed.