Export all data when using server side processing

Export all data when using server side processing

lotoole_6899lotoole_6899 Posts: 3Questions: 0Answers: 0

Hi,

I know there are, as one person said, '100's' of threads on this but I just wanted to highlight one thing.

Having the ability to download all information form the database and using datatables server side processing should not be mutually exclusive as contributors are consistently saying.
There is a business model for doing this, i.e. the pagination and sorting on a large dataset should be available via server side processing when the end user is using it on a web page, however they would also need the ability to download filtered sets and more than likely a full set of data to take offline.
The ability to download the full set is much more useful than just having the ability to download the single page you are viewing, a relatively uncommon requirement I would imagine.

The fact there are '100s' of threads on this should give you an indication that the functionality is required.

Replies

  • vivekinglevivekingle Posts: 1Questions: 0Answers: 0
    edited July 2016

    Hi ALL,

    can U please help me for export functionality,

    I am adding below js in my project
    jquery-1.12.1.min.js
    jquery.dataTables.js

    My Code is below

    $(document).ready(function(){ var data =eval('${employeeList}'); var table = $('#example').DataTable( { "aaData": data, "aLengthMenu": [[ 25, 50, 100, -1], [ 25, 50, 100, "All"]], "aoColumns": [ { "mData": "firstColumn"}, { "mData": "secondcoulm"}, { "mData": "thirdcolumn"}, { "mData": "foruthcolumn"}, { "mData": "fifthcolumn"}, { "mData": "sixth"}, { "mData": "seventh"}, ], "paging":true, "ordering":true, "deferRender": true }); });

    I am adding export code into this script but it doesn't get added ,How to added export functionality in above code ?

    Thanks
    Vivek

  • allanallan Posts: 61,971Questions: 1Answers: 10,160 Site admin

    I agree that this is something that can be useful. However, the facts remain:

    • The file export of Buttons is client-side. Therefore it can only operate with the data available on the client-side.
    • Perhaps it could request the full data set from the server, but at that point any benefit you have from server-side processing is gone. All it is doing is adding latency into your app.

    I am absolutely open to ideas on how it could and should be done, but just don't see a clean way to do it at the moment.

    @vivekingle - Please open a new thread and link to a page showing the issue, per the forum rules, so it can be debugged.

    Allan

This discussion has been closed.