multi valued iDataSort
multi valued iDataSort

The use case is having two separate columns (hidden) that are combined to make a single column (displayed), and when sorting on the displayed column you need to sort both underlying columns.
A workaround is to replace the existing header click event and perform the sort "manually", eg.
[code]
oTable.fnSort([
[col1, 'asc'],
[col2, 'asc']
]);
[/code]
This workaround is suboptimal as "shift sorting" (standard datatables multicolumn sorting) requires quite some work to reimplement, versus the patch to allow this behaviour.
A patch to 1.8.1 is available in the following discussion http://www.datatables.net/forums/discussion/comment/24275
I'm not sure of the procedure here for submitting patches so I thought I'd start this discussion and see what happens :)
A workaround is to replace the existing header click event and perform the sort "manually", eg.
[code]
oTable.fnSort([
[col1, 'asc'],
[col2, 'asc']
]);
[/code]
This workaround is suboptimal as "shift sorting" (standard datatables multicolumn sorting) requires quite some work to reimplement, versus the patch to allow this behaviour.
A patch to 1.8.1 is available in the following discussion http://www.datatables.net/forums/discussion/comment/24275
I'm not sure of the procedure here for submitting patches so I thought I'd start this discussion and see what happens :)
This discussion has been closed.
Replies
Regards,
Allan