RowReorder - Prevent ordering

RowReorder - Prevent ordering

GenjiffGenjiff Posts: 1Questions: 1Answers: 0

Hi :smile:

I'm using the RowReorder plugin and I want to prevent the user to reorder the rows if some check fails. I'm was trying to disable reordering on the pre-row-reorder event, but this doesn't work. Here's what I'm trying to do:

http://live.datatables.net/catapuke/1/edit

Is there a way to prevent the user to reorder the table after he starts the reordering?

thanks!

Answers

  • kthorngrenkthorngren Posts: 20,142Questions: 26Answers: 4,736

    Maybe you can simply enable or disable within the init code. Something like this:

      var isReorder = is user allowed to reorder
      var table = $('#example').DataTable( {
            rowReorder: isReorder,
        } );
    

    Kevin

This discussion has been closed.