+ Start a Discussion
Sridhar Bojja 5Sridhar Bojja 5 

Need Final Re-Ordered data from Jquery Datatable

I  have a Visulaforce Page which shows some list of records in order. I have implemented Jquery DttaTable to Re-order the row and want to save the final reordered data to server. I have written the below code.

$(document).ready(function() {
var table = $('#example').DataTable( { rowReorder: { selector: 'tr' }, columnDefs: [ { targets: 1, visible: true } ] } );
table.on( 'row-reorder', function ( e, diff, edit ) { alert('chnaged'); console.log(table.rows().data());
} );
} );


I am getting the initial data in the console.log(table.rows().data());
I want the final reordered data. Please help. Thanks in advance.