Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Row reordering not works in Datatable jquery plugin

I am use Datatable plugin version - 1.10.15

I want to make my table rows draggable for changing sorting orders and for that i use data tables 'Row reordering' feature but it not works

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

This is my work but not works

I am trying with 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

like image 886
Nidhi Avatar asked Mar 02 '26 05:03

Nidhi


1 Answers

I solved my problem using DataTables 1.10.9, RowReorder 1.0.0

Here is working fiddle with data table child rows

Simple solution is :

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

DEMO

like image 186
Nidhi Avatar answered Mar 03 '26 17:03

Nidhi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!