Datatable export option to csv is not fetching all data

Datatable export option to csv is not fetching all data

yahyaaayahyaaa Posts: 2Questions: 1Answers: 0

Hello forum,

I have used datatable to view 500K table data and used server processing option since the data table is huge,

    <script>
        $(document).ready(function () {
            $('#employee_grid').DataTable({
                "processing": true,
                "serverSide": true,
                "ajax": "server_processing.php",
                "dom": 'lBfrtip',
                "buttons": [
                    {
                        extend: 'collection',
                        text: 'Export',
                        buttons: [
                            'copy',
                            'excel',
                            'csv',
                            'pdf',
                            'print'
                        ]
                    }
                ]
            });
        });
    </script> 

Am trying now to use the export option but what am getting is the first 10 records only...
how can I change it so I export all filtered data and not the data shown in the first page only ?

Thanks

Answers

  • yahyaaayahyaaa Posts: 2Questions: 1Answers: 0

    I cant use -1 option using " "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ]" since i will get error due to data size.

This discussion has been closed.