How to change rowReorder.dataSrc attribute dynamically
How to change rowReorder.dataSrc attribute dynamically
Gopi_G
Posts: 3Questions: 1Answers: 0
I am using DataTable 1.10.12 , and rowReorder in it. It is working fine but when I apply ordering on any column, It is not working. Please suggest me. How can I achieve it? How can I change rowReorder.dataSrc dynamically?
This discussion has been closed.
Answers
I'm afraid you can't. There is no API for that at the moment.
Allan
Thanks @allan for quick reply. Please suggest me if there is any other way to achieve it? Because I want rowReorder to be working well after sorting on some column. let me know if there is any way please..
RowReorder wasn't designed with that in mind - it assumes that the data to swap is always going to be one specific data point.
If you want to have the ability to change it dynamically, you'd need to use set this property via a new API method.
Allan
@allan I have solved the problem by setting
orderable:false
to that column and applying custom sorting on that column. Now It is working fine. Thanks for Your response.