Adding columns: destroy & create is still the right way?

Adding columns: destroy & create is still the right way?

Rusty BallingerRusty Ballinger Posts: 14Questions: 5Answers: 0

I have a case where the user selects a date range and hits a button, at which point I want to fill a table with a few columns of data which will always be there, and then one column per month in the date range. (At the point where I'm making the Ajax request to get the data, I know how many columns I'm requesting; I don't have to wait for the results from the server.)

Here's what I've found on this:

(For a variable number of columns--the initial/default display is something goofy like 60 columns--it seems like the FixedColumns extension is pretty much a requirement, but they also want child rows, which are not compatible with FixedColumns. I haven't decided which one I'm going to go with... I might just create an empty second table for the child rows, and populate that when they select a row in the "parent" table.)

This question has an accepted answers - jump to answer


  • allanallan Posts: 48,883Questions: 1Answers: 7,123 Site admin
    Answer ✓

    Yes. DataTables does not have an API to dynamically add and remove columns at this time.


Sign In or Register to comment.