DataTables logo DataTables

via Ad Packs
rowReordering plugin - multiple tables, only first table works correctly. New records don't reorder
  • lgmahallgmahal
    Posts: 4
    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:

    	$(document).ready(function() {
    	                oTable1 = $('#TableId1').dataTable( );
    	                oTable2.rowReordering();
    		oTable2 = $('#TableId2').dataTable( );
    	                oTable2.rowReordering();
                      });
    

    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.
← All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.