Selecting/Sorting dataTables column

Selecting/Sorting dataTables column

reddoreddo Posts: 6Questions: 0Answers: 0
edited March 2014 in DataTables 1.10
Hello.
I have the following setup:

http://live.datatables.net/hipilix/1/

As you can see, I have two rows in the header and 1 row in the footer.

My problem is the following: the very first row in the `thead` and the 1 row in the `tfoot` don't get allocated their respective sorting classes.

Is there a problem with the `colspan` s in those rows and that's why the column classes don't get allocated? If so, what can I do to get around this?

Also is there a separate way to select an entire column, give that column a class, which doesn't get messed up by the colspans?

Replies

  • reddoreddo Posts: 6Questions: 0Answers: 0
    Does anyone have any ideas. All I need is a push in the right direction ;)

    latest version: http://live.datatables.net/hipilix/2
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    DataTables doesn't support colspan.
    Try a forum search.
  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    It does in the header and footer, although each column requires a unique cell somewhere in the header. It is in the tbody that DataTables doesn't support colspan / rowspan, but that isn't the issue here.

    In the code there is:

    > ordering: false,

    So order (sorting) is disabled. So DataTables wouldn't be applying any sort classes anywhere. Or am I missing something?

    Allan
  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    > Also is there a separate way to select an entire column, give that column a class, which doesn't get messed up by the colspans?

    In 1.10 you can use the `column()` selector: http://next.datatables.net/reference/api/column()

    Allan
This discussion has been closed.