Could DataTable help me sort a column so that order of values of ordinal column (its values 1, 2, 3...) doesn't change? If yes, hope everyone help me... pained because of it for some days!
This isn't something which is built into DataTables, but could be done through a callback function. What to do is to use fnDrawCallback() ( http://datatables.net/usage#fnDrawCallback ) to renumber your ordinal column on each draw. To optimise this it would be good to check the value of aaSorting from the last draw against the current aaSorting value to see if the sorting has changed. In this way you can update the ordinal only if needed.
Hope this helps! If you make any head way with this code, perhaps you could post it here? I'm sure others would find it useful as well!
Replies
Hope this helps! If you make any head way with this code, perhaps you could post it here? I'm sure others would find it useful as well!
Regards,
Allan