Specify particular row for ordering and FixedHeaders cloning

Specify particular row for ordering and FixedHeaders cloning

DeFKnoLDeFKnoL Posts: 4Questions: 1Answers: 0

I have a table with 3 header rows and I would like to use row 2 (not 1 or 3) for the ordering. I also want the FixedHeader extension to get its column widths from this row. Is there a way to do this? i have only been able to find the OrderCellsTop boolean which can only let me specify whether it would work with row 1 or 3 (top or bottom row).

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,235Questions: 1Answers: 2,597

    Hi @DeFKnoL

    I'm not sure about the middle row for ordering - orderCellsTop allows switching between the top and bottom rows, but I don't believe there's the granularity for other rows.

    Cheers,

    Colin

  • DeFKnoLDeFKnoL Posts: 4Questions: 1Answers: 0

    Thanks @colin, I am thinking that it would be cool if there were a class you could specify on a TH that would force it to be used as the order cell for that column. Then you could have as many header rows above or below your target column header cells as desired without interrupting the ordering functionality.

    I am assuming that the FixedHeaders extension uses the same method to determine the cloned width of the floating column headers. It would be cool if that used a similar class specification.

  • allanallan Posts: 62,969Questions: 1Answers: 10,362 Site admin
    Answer ✓

    Yes, as Colin correctly says, the orderCellsTop option is simply top or bottom, there isn't the option of specifying a particular row, or even a mix of cells from different rows (useful if you have colspan / rowspan headers).

    It is something that is on our tracker for a future release, but its not something that has been scheduled in yet.

    If this is fundamentally important for you, you could use order.listener() to apply the ordering listener to the cells (or any other element) that you want to specify.

    Allan

  • DeFKnoLDeFKnoL Posts: 4Questions: 1Answers: 0

    Thank you. I think i can make that work.

This discussion has been closed.