How to use column grouping from data source other than already rendered DOM
How to use column grouping from data source other than already rendered DOM
suricactus
Posts: 3Questions: 1Answers: 0
I'm looking this example: https://datatables.net/examples/advanced_init/complex_header.html
I wonder how to achieve the same result with Javascript/Ajax source of data?
This discussion has been closed.
Answers
Details on how to Ajax source data with your DataTable are available here. Basically you need to use
ajax
.Allan
I mean how to achieve complex header example, where I have colspan on first row and subheaders on next header row. In the example is clear how to achieve this using DOM as API, my question is how to make complex headers with
columns
option?There is no option to create a complex header using DataTables' initialisation options. There are a number of other threads on this topic if you use the search bar at the top of the page - for example.
You would need to use jQuery / DOM methods to create the complex header before the DataTable is created I'm afraid.
Allan
Thank you, Allan.
If there is any plan to support it, I might help with the implementation.
Currently no because I'm not sure what a good API for it would be. Any suggestions welcome.
Allan