Hidden column sorting and colspan

Hidden column sorting and colspan

plsoftplsoft Posts: 3Questions: 0Answers: 0
edited July 2012 in General
Here's what i want to do, please tell me if it's possible to do so:
1. There are four header columns
2. There are two data columns with colspan of 2 each [this is important for the kind of layout being proposed for our project], but sorting will not be performed based on these columns
3. There are four hidden columns based on which actual sorting will be done.
4. Use "iDataSort" to map the header columns and the hidden columns to sort

I know how to implement points 1, 3 and 4. How do i achieve point 2, i mean assign colspan?

I'm aware that straightforward sorting is not possible with colspan for now. But since sorting will not be performed based on the columns having colspan, i thought it would be possible.

Thanks and hoping for the best.

Replies

  • plsoftplsoft Posts: 3Questions: 0Answers: 0
    Anyone?
  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin
    DataTables currently does not support colspan or rowspan in the tbody of a table. It would make per-column sorting / filtering ambiguous and very complex / slow, so it is not something that is currently implemented. It is something that I keep hoping to come back to, but I've not found a way to do it yet that does not massively increase the DataTables code size, or impact significantly on performance (rows / columns going in and out for example just have row/colspan recalculated every time).

    Allan
  • plsoftplsoft Posts: 3Questions: 0Answers: 0
    Thanks for the clarification and a great plugin. Hope you'll come up with a way to handle this functionality in a future release.
This discussion has been closed.