Display detailed info in modal without making ajax calls
Display detailed info in modal without making ajax calls

Hi
I've been given a json datasource which I use with PHP to retrieve data to build my Datatable manually.
I mean, it is not serverside (yet). This json datasource has almost no parameters to query
Each record from json response has around 20 fields, but I only show in the table only 6, 7, the most important ones.
Each table's row has a small button with lupe icon in the last column
Is there a way to open a modal/lightbox and show all the other fields when clicking that button, without making ajax calls again? The json datasource has no param to query and give a specific record based on ID
Maybe there's some way to hide detailed info for each row and show all 20 fields in the modal when clicking each button
Thanks a lot for any tips/ideas you can give me
This question has an accepted answers - jump to answer
Answers
This example shows how to get the row data of a clicked row. This example shows one way to add buttons to a row and get the row data of the clicked button.
http://live.datatables.net/xijecupo/1/edit
With the
row().data()
API used in these examples you will have access to all 20 fields even though you show only a subset. You can populate the modal with this data.Kevin
Thanks a lot @kthorngren