using mDataProp and TableTools Copy, to CSV/PDF etc (Bug report and fix idea)
using mDataProp and TableTools Copy, to CSV/PDF etc (Bug report and fix idea)
DLC
Posts: 4Questions: 0Answers: 0
I use mDataProp and JSON object for loading my data and found that the table tools copy was not working -- it would just return a table with its headers and undefined for all other values.
If you look in TableTools function _fnGetDataTablesData
there is a line like this:
[code]
var mTypeData = dt.aoData[dt.aiDisplay[j]]._aData[i];
[/code]
This assumes you are using the array notation to initialize your array with data.
I just changed the line to:
[code]
var mTypeData = dt.aoData[dt.aiDisplay[j]]._aData[dt.aoColumns[i].mDataProp];
[/code]
and everything worked fine
If you look in TableTools function _fnGetDataTablesData
there is a line like this:
[code]
var mTypeData = dt.aoData[dt.aiDisplay[j]]._aData[i];
[/code]
This assumes you are using the array notation to initialize your array with data.
I just changed the line to:
[code]
var mTypeData = dt.aoData[dt.aiDisplay[j]]._aData[dt.aoColumns[i].mDataProp];
[/code]
and everything worked fine
This discussion has been closed.