Yes it is possible - see this example: http://datatables.net/release-datatables/examples/data_sources/js_array.html . You must define the number of columns using aoColumns and set sTitle for each column so DataTables can insert the columns needed.
Thanks Allan for the answer and example. As I learned and understood, a 'thead' is a must-have element in a dataTable, isn't it? Can we make it an optional one? that is - a table with only tbody and trs, no thead at all. Is it possible to do so? What I can imagine now is to hide thead elements in fnHeaderCallback.
> As I learned and understood, a 'thead' is a must-have element in a dataTable, isn't it? Can we make it an optional one?
Fundamentally yes, a thead element is required. What would be the use case for not having one?
It would be possibly to simple use something like `$('#example thead').detach();` to remove a built thead, but as I say, I'm not sure of the use case :-)
Replies
Allan
Fundamentally yes, a thead element is required. What would be the use case for not having one?
It would be possibly to simple use something like `$('#example thead').detach();` to remove a built thead, but as I say, I'm not sure of the use case :-)
Allan
[code]
R-Colgrp1
R-Colgrp2
...
R-Col1
R-Col2
R-Col3
R-Col4
R-Col5
R-Col6
R-Col7
...
[/code]
The THs in the 1st TR group the THs in the 2nd TR, but in my application, this head is dynamically created, not fixed.
After checking all examples, I didn't get a clear way to use DataTables to handle this. Do you have any advise on this?
Allan