how to disable colReorder's drag interaction?
how to disable colReorder's drag interaction?
bikai
Posts: 21Questions: 12Answers: 0
hi, I need to change coloums order without reinit datatable, I found colReorder plugin
.
It's great, but it allow user to drag table coloum directly, I want to disable this interaction.
Is this possible?
This discussion has been closed.
Answers
Don't enable the
colReorder
option in your table initialisation.colReorder.order()
should still work.Allan
Hi, without
colReorder
option or set it tofalse
, when changing col order:error:
TypeError: Cannot read property 'fnOrder' of undefined
Sorry about that - you are absolutely correct: http://live.datatables.net/juteloqi/1/edit .
At the moment you'll need to enable
colReorder
and then remove the event listener it adds for the mousedown event: http://live.datatables.net/juteloqi/2/edit .Regards,
Allan
Thanks, allan, you helps a lot