multi valued iDataSort

multi valued iDataSort

andrewsharpe79andrewsharpe79 Posts: 4Questions: 0Answers: 0
edited August 2011 in Feature requests
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 :)

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    edited November 2011
    Old one I know, but for anyone else interested in this, and really sorry its taken me so long to reply, I've just posted a reply here: http://www.datatables.net/forums/discussion/6126 .

    Regards,
    Allan
This discussion has been closed.