"orderCellsTop": true has no effect for Complex headers (rowspan and colspan)

"orderCellsTop": true has no effect for Complex headers (rowspan and colspan)

duselguyduselguy Posts: 24Questions: 3Answers: 0

Hello,
"orderCellsTop": true has no effect for the example in https://datatables.net/examples/basic_init/complex_header.html
Is it WAD?
Regards,
LP

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    It has no effect in that example because the sort cells are applied to the unique cells for each column, and there is only 1 unique cell for each column in that header.

    Here is an example (a bit redundant, but it is only an example!) showing orderCellsTop working: http://live.datatables.net/yufezat/1/edit

    Allan

  • duselguyduselguy Posts: 24Questions: 3Answers: 0

    Hello Allan,
    thank you for the comment and example. But it looks like the option "orderCellsTop": true is far from the real world where the keys (that require sort) have (in most cases) few fields (columns). I'm surprised.
    Best regards,
    LP

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    So you would expect the colspaning element to click and sort four columns and not be able to click and sort the individual columns?

    Clicking the colspan element to sort multiple columns would be a nice feature... :-)

    Allan

  • duselguyduselguy Posts: 24Questions: 3Answers: 0

    When I started with datatables I assumed this feature exists :-(
    Thinking ...
    Best regards,
    LP

This discussion has been closed.