Sort order issue with ColReorder
Sort order issue with ColReorder
Hi,
I am using datatables(client-side) with ColReorder and showing/hiding columns programmatically using fnSetColumnVis(index, true). I have set stateSave = true.
Whenever I reorder columns, do sorting on a column, hide/show columns, reorder columns again and click refresh, I am getting different sort column index from fnSettings().aaSorting and fnSettings().aLastSort than column I had sorted on.
Due to this I am unable to sort back on column that User had last sorted. I am using fnSort to sort column based on index retrieved from aaSorting. Can someone please let me know how to resolve this.
Thanks,