I have a lot of data sets. I want to plot all of them and export some of them to file (or print them as in example below) by clicking buttons generated next to plots.
(*Create list of 5 random data sets*)
datalist = RandomInteger[10, {5, 20}];
(*Plot all data sets and create buttons to print raw data*)
Table[{ListPlot[data], Button["Print data", Print[data]]}, {data, datalist}]//Grid
My approach is not working, as the action of the button is executed outside of the scope of 'Table' function. How can I procedurally generate distinct buttons binded to different elements from list?