How can we use colsapn in tbody of table
Thank in advance for help...
https://datatables.net/examples/basic_init/complex_header.html
First thing found on google for "Datatables + colspan" ;-)
You can't use colspan or rowspan in DataTables' tbody. It simply isn't supported at this time - sorry.
tbody
Allan
I found a hack using invisible cells. See http://stackoverflow.com/a/34012324/1104244
Interesting... i havent seen that before
That's cunning - I'm impressed that browsers render that correctly. It should be used with caution though, since it isn't valid HTML - for example run the following through the W3C validator:
<!doctype html> <html> <head> <title>123</title> </head> <body> <table> <tbody> <tr> <td colspan="3">Wide column</td> <td style="display: none;"></td> <td style="display: none;"></td> </tr> <tr> <td>Normal column</td> <td>Normal column</td> <td>Normal column</td> </tr> </tbody> </table> </body> </html>
Also, I suspect odd things might start happening if you use the column visibility options in DataTables.
It looks like you're new here. If you want to get involved, click one of these buttons!
Replies
Thank in advance for help...
https://datatables.net/examples/basic_init/complex_header.html
First thing found on google for "Datatables + colspan" ;-)
You can't use colspan or rowspan in DataTables'
tbody
. It simply isn't supported at this time - sorry.Allan
I found a hack using invisible cells. See http://stackoverflow.com/a/34012324/1104244
Interesting... i havent seen that before
That's cunning - I'm impressed that browsers render that correctly. It should be used with caution though, since it isn't valid HTML - for example run the following through the W3C validator:
Also, I suspect odd things might start happening if you use the column visibility options in DataTables.
Allan