datatable Header is broken..

datatable Header is broken..

thiefyouthiefyou Posts: 14Questions: 0Answers: 0
edited November 2011 in DataTables 1.8
I create table use rowspan

but table header is broken...

I hope fixed table header... help... T_T)

http://live.datatables.net/onetit/3/edit

Replies

  • thiefyouthiefyou Posts: 14Questions: 0Answers: 0
    I'm not use IE/FireFox/chrome...

    only galaxy tab use.
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    I don't have a Galaxy Tab to test this with I'm afraid, but the table looks just fine in desktop Safari to me, and from the code I don't see any reason why it wouldn't work. In what way does the Tab break it?

    Allan
  • thiefyouthiefyou Posts: 14Questions: 0Answers: 0
    thanks comment to Allan..

    but..

    make with html tag complex header and body(rowspan)

    and click to header proceed reorder... table body is broken...

    ... um..

    maybe you understand...?
  • thiefyouthiefyou Posts: 14Questions: 0Answers: 0
    Allan

    Can I return clicked dataTable header index?
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Ah I see - DataTables does not support rowspan or colspan in TBODY. I'm afraid that this is simply a limitation of how DataTables is currently implemented (and it is not an easy one to get around - for example how do you sort by a column with some cells that colspan and some that don't).

    > Can I return clicked dataTable header index?

    Yes, just use the jQuery $().index() method. This is an example of it being used with fnFilter: http://datatables.net/release-datatables/examples/api/multi_filter.html

    Allan
  • thiefyouthiefyou Posts: 14Questions: 0Answers: 0
    yes...

    thanks comment Allan.

    have a nice weekend
  • thiefyouthiefyou Posts: 14Questions: 0Answers: 0
    Allan

    I got it!

    Your function is normal head and body is best!

    but complex body is not good...

    I try to get all data and header index, sort data and fnAddData.

    When I get all data, body apply to rowspan is not next data.

    Can you add sorting dataTable function for rowspan?
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    I'm afraid not - as I mentioned before it would be very complex to add rowspan or colspan support to DataTables for the TBODY. It works fine of the header since the header is static, but the body is not, with columns being able to be made visible or not, reordered, and rows being filterable, etc. So the answer is, yes it could be done, but it would add a huge amount of overhead to DataTables. So at best, a fork of DataTables could be made which does this, but it would be a lot of engineering effort to do it.

    Allan
This discussion has been closed.