retrofitting data tables on a complex table

retrofitting data tables on a complex table

joatmanjoatman Posts: 11Questions: 0Answers: 0
edited June 2011 in General
Hello,
I'm trying to retrofit data tables to get sorting functionality on a complex table - the cells contain a combination of images, other html tags like
, s, other tables inside divs etc.
i'm getting errors like:
Data tables warning: requested unknown parameter '4' from the data source for row 1.
after which the table formatting gets completely messed up.

question is: is it possible to use data tables on a table as described above? if yes, what resources/docs should i look at, to figure out how to do this?

thanks,
Nilesh

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    As long as your table is well formed ( http://datatables.net/usage/#prerequisites ) then DataTables won't mind what information is in each cell. One thing to note is that DataTables does not support colspan and rowspan in the TBODY, which might be what you are seeing?

    Allan
  • joatmanjoatman Posts: 11Questions: 0Answers: 0
    Thanks Allan. you're right - it's a rowspan issue. so would datatables be out of the question? or is there a way to work around this?
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    At the moment DataTables requires an individual cell for each row by column - this is a requirement for the filtering and sorting as it stands and there isn't a way around it if rowspans are required - sorry. The closest DataTables gets is something like this: http://datatables.net/release-datatables/examples/advanced_init/row_grouping.html

    Allan
This discussion has been closed.