Sairam Duggi
Sairam Duggi

Reputation: 165

How can we display 100k records in data table with export options?

I have a table with more than 100 000 records.

I need to display them in Data Table but the constraint for the Data Table is 25 000 records.

When there are more than 25 000 records the data is not fetched into the data table from the database.

Can anyone suggest the best option for this?

I am using the data table for the download of reports which is easier.

Upvotes: 0

Views: 778

Answers (1)

Emre Bolat
Emre Bolat

Reputation: 4562

Server-side processing is the way to go if you have huge amounts of data to show.

Usage is;

 $('#example').DataTable( {
        serverSide: true,
        ajax: function ( data, callback, settings ) {
           ........
        },
        scrollY: 500,
        scroller: {
            loadingIndicator: true
        }
    });
});

So, this code is an example of infinite scroll implementation. When you scroll 500px (scrollY: 500) in vertical direction, new data is going to be fetched from the backend after showing a "loading..." text on the table.

For more information, you can check this example: link.

Upvotes: 1

Related Questions