MongoDB + DT: Group rows in a new parent row, save entire configuration, etc.
MongoDB + DT: Group rows in a new parent row, save entire configuration, etc.
Some background info: I'm using a recent version of MongoDB. I use jQuery to send POST requests to the server in JSON format, and those requests are processed by PHP scripts. I'm building a data-focused application - essentially it's an interface where you can build your query and the selections you make are turned into JSON in the format MongoDB accepts in '.find()'. Mongo kicks back result data relevant to the user's selections and I loop through that data to create a basic HTML table. But now I need to add a TON of features:
Drag & drop columns
Paginate rows
Group rows by the values in a column (like sorting but put rows with the same value for the given column inside a new parent row - think of it as a single-column table inside of a <TD>)
Do math on an entire column (find the average and geometric mean, and maybe some other stuff) as well as on grouped rows
Sort by multiple columns in a priority order (ex: by city, then date, then author)
Save and load the whole configuration - the order of the columns, the query used to pull in the data, the sorting, the grouping, the command to do math on the columns, every part of the configuration
Export results to Excel or CSV
Eventually start charting and graphing some of the data
Datatables looks like a great way to go - maybe the only way... I just want to make sure you guys think this is all reasonably doable with DataTables. Is there a complete example of something close to what I'm doing? Grouping the rows this way seems difficult but saving the entire configuration is going to be the hardest thing to do. I'd love an explanation or demo of how to do those two things if they're possible with DT!
Thank you!