Updating Exported Data
Updating Exported Data
BenKatz
Posts: 4Questions: 0Answers: 0
I'm dynamically updating (via jQuery .load) content in my table. When I go to export data (PDF, .csv or text), it exports the data as of when TableTools was initialized.
I don't want to re-initialize TableTools every time data changes. Is there a way to have the data update on export? Any other suggestions?
Thanks!
I don't want to re-initialize TableTools every time data changes. Is there a way to have the data update on export? Any other suggestions?
Thanks!
This discussion has been closed.
Replies
Allan
[code]
function dataTablesRefreshCell($cell){
var col = $cell.parent().children().index($cell);
var row = $cell.parent().parent().children().index($cell.parent());
$cell.closest("table").dataTable().fnUpdate($cell.html(),row,col);
};
[/code]
[code]
function dataTablesRefreshCell($cell){
oTable=$cell.closest("table").dataTable()
var pos = oTable.fnGetPosition($cell[0]);
oTable.fnUpdate($cell.html(),pos[0],pos[1],false,false);
};
[/code]
Allan