Multiple column sort with server side

Multiple column sort with server side

luefherluefher Posts: 1Questions: 0Answers: 0
edited July 2013 in DataTables 1.9
I'm trying to figure out what I am missing here - setting a multiple column sort initially is easy via aaSorting, but when I click on a column to sort, the only data I get on the server side is for just that one column.
I.e., if I have A, B, C columns I can set up to initially sort like this:

[code]
'aaSorting': [[2, 'asc'], [0, 'desc'], [1, 'asc']]
[/code]

All of which come as iSortCol_# on the server side. But if I click on column B, I only get iSortCol_0 on the server side, with iSortingCols = 1. In this case what I really want is to have B shifted up front so the new sort is [[0, 'desc'], [2, 'asc'], [1, 'asc']].
I just know I'm probably missing some property somewhere :)
Anyone?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    If you use aDataSort you can tell a column that it should do a multi-column sort rather than just by itself.

    Allan
This discussion has been closed.