How I can decrease row number on ajax load data
How I can decrease row number on ajax load data
![gulasofthack](https://secure.gravatar.com/avatar/8a22b650f1d8a767e441d16f32ba56b1/?default=https%3A%2F%2Fvanillicon.com%2F8a22b650f1d8a767e441d16f32ba56b1_200.png&rating=g&size=120)
I have 1000-2000 rows and ~100 columns. The datatables started, and load ~270 row, and this slow. How i can decrease this length parameter when ajax is loading? I not use pagination and use server side, scroller, and saveState. I need only 100 row load each ajax call.
This discussion has been closed.
Answers
Are you saying that you have
serverSide
enabled but are retrieving more data than what your page length is set for?If so then your server script is probably not setup to handle the parameters being sent as described here:
https://datatables.net/manual/server-side
Kevin
Dear Kevin!
This is my server side options:
And this is the request when datatables call my ajax:
![](https://datatables.net/forums/uploads/editor/34/b7g1cfyslw1x.png)
The start is "0" its ok, because the length="243".
Hi @gulasofthack ,
It looks like that table initialisation has been cut short. The length should be the number of records per page (or -1 if no paging - but then there's little value to using
serverSide
if no paging).I'd say check that initialisation first of all, and if all good, could you link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Dear Colin!
The scroller not working withot paging
![](https://datatables.net/forums/uploads/editor/ca/yrlfoldydf9l.png)
If I set paging:false,the request length=-1, but the scroller not working, and not call my ajax when visibled row is ended.
This examplews use scroller for get data from server.
https://datatables.net/extensions/scroller/examples/initialisation/large_js_source.html
https://datatables.net/extensions/scroller/examples/initialisation/server-side_processing.html
And these is working, but I not set max record count from one ajax call.
The 27310=2730 cells, but 273100=27300 cells, and this draw time is too long.
Hi @gulasofthack ,
Yep, as I said, we're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin