alfajango / jquery-dynatable

A more-fun, semantic, alternative to datatables
http://www.dynatable.com
Other
2.77k stars 361 forks source link

Converting JSON from Dynatable to CSV #162

Open sozerberk opened 9 years ago

sozerberk commented 9 years ago

I'm using Dynatable plugin to filter and sort my HTML table. I want people to download results as CSV file. I don't know how to fetch JSON data from Dynatable as they're sorted. Could anyone tell me how to do this?

CaptainCannabis commented 9 years ago

var ListItems = $('#tableselector').data('dynatable').settings.dataset.originalRecords;

This should help you. You can access all the config parameters and other stuff by using jQueries "data('dynatable').

sozerberk commented 9 years ago

@CaptainCannabis Thanks a lot! That really helped.