multi valued iDataSort
multi valued iDataSort
![andrewsharpe79](https://secure.gravatar.com/avatar/6bcb60d9013503a416f3d4d9579eb351/?default=https%3A%2F%2Fvanillicon.com%2F6bcb60d9013503a416f3d4d9579eb351_200.png&rating=g&size=120)
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