Loss of data when exporting, using fnRowCallback to modify the table exporting Definiciones de expor

Loss of data when exporting, using fnRowCallback to modify the table exporting Definiciones de expor

apaparelliapaparelli Posts: 2Questions: 1Answers: 0

Hi, I have a problem with the export buttons.

I use 'fnRowCallback' to modify data in the table, and when exporting to PDF, csv, etc, this data does not take them.

I use ajax to get the data.

any ideas? Maybe some missing parameter?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,276Questions: 26Answers: 4,765
    Answer ✓

    Suspect it has to do with how you are updating the data. Can you post your Datatables init code?

    Kevin

  • apaparelliapaparelli Posts: 2Questions: 1Answers: 0

    thanks kthorngren,

    this function is built in a python template

    js_str = """
    function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
    [...]
    lastev = '<b>' + VAR+ '</b>


    ' + VAR;
    $(nRow).find('span[id="lastUpd"]').replaceWith(lastev);
    [...]
    }"""

    when I call datatables

    [...]
    'fnRowCallback':js_str,
    [...]

This discussion has been closed.