Row reordering not working in Datatable jquery plugin

I am using the Datatable plugin version - 1.10.15

I want the table rows to be dragged to change the sort orders, and for that I am using the "Row reordering" data tables, but does not work

gives me an error: Uncaught TypeError: table.rowReordering is not a function

This is my job but doesn't work

I am trying to include all related external sources

My script is

$(document).ready(function() {
  var table = $('#example').DataTable({
    "iDisplayLength": 50,
    'createdRow': function(row, data, dataIndex) {
      $(row).attr('id', 'row-' + dataIndex);
    }
  });

  table.rowReordering();
});

      

Please help me to find out where I am going wrong by seeing my example

+3


source to share


1 answer


I solved my problem using DataTables 1.10.9, RowReorder 1.0.0

Here's a fiddle running with child rows of data table

A simple solution:



var table = $('#example').DataTable({
  rowReorder: true,
  "iDisplayLength": 50,
});

      

DEMO

+3


source







All Articles