sourcedata from hotInstance.getSourceDataArray() isn’t reflecting the column/row move operation.
What is the best way to update sourcedata that reflects the move operation?
sourcedata from hotInstance.getSourceDataArray() isn’t reflecting the column/row move operation.
What is the best way to update sourcedata that reflects the move operation?
Altering rows/columns order only reflects in visual data change. If you want to get the visual data after performing such operation you can use either afterRowMove
or afterColumnMove
hooks and run getData()
method to get the data after moving the rows or columns. Here’s an example: https://jsfiddle.net/handsoncode/4snjLotc/
Thanks for the clarification. For my usecase that involves saving to a database backend, i am replicating the changes to my sourcedata.
I understand. So, is this solution right for your requirements? You can additionally update the data after each moving operation using loadData
method so the source data will be automatically updated: https://jsfiddle.net/handsoncode/sq2r98L6/