Exporting filtered data does not work

Exporting filtered data does not work

mttgnemttgne Posts: 4Questions: 1Answers: 0

Hi,
I have a problem when I try to export data after applying a filter.
I read a discussion suggesting to use oSelectorOpts but it's not working for me.
This is the code I use to initialise the table:
$(document).ready( function () {
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"tableTools": {
"sSwfPath": "./swf/copy_csv_xls_pdf.swf"
},
"oTableTools": {
"aButtons": [
{ "sExtends": "copy",
"oSelectorOpts": {
filter : "applied"
}
}
]
}
} );
} );

Do you have any idea why it's not working?

thanks

Replies

  • cyphercypher Posts: 1Questions: 0Answers: 0
    edited July 2014

    Having a similar issue. I have done a lot of googling and they all point to oSelectorOpts but it's not working for me.

    $('#users').dataTable({
                    "dom": 'T<"clear">lfrtip',
                    "tableTools": {
                        "sSwfPath": "/public/plugins/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
    
                        "aButtons ": [
                            {
                                "sExtends": "pdf",
                                "bSelectedOnly": true,
                                "oSelectorOpts": {
                                    "filter": "applied",
                                    "order": "current"
                                }
                            },
                            {
                                "sExtends": "copy",
                                "bSelectedOnly": true,
                                "oSelectorOpts": {
                                    "filter": "applied",
                                    "order": "current"
                                }
                            },
                            {
                                "sExtends": "xls",
                                "bSelectedOnly": true,
                                "oSelectorOpts": {
                                    "filter": "applied",
                                    "order": "current"
                                }
                            }
    
                        ]
                    }
                });
    
This discussion has been closed.