editor (generated by Generator) serverside processing behaves abnormally.

editor (generated by Generator) serverside processing behaves abnormally.

Clark SClark S Posts: 27Questions: 8Answers: 0

I generated the editor package by using the Generator and ran the code with Node V16.
so the code runs without any errors but it just doesn't paginate at all.
I added serverSide myself and it turned out reading all records at once. (1000+ records)
could figure out what has been wrong...

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    When option -serverSide is enabled, it's the server-side script that controls that pagination (and searching and ordering), so there's likely going to be an issue there. This example here should help - take a look at the "Server script" tab, you'll need to be doing something similar to that. Let us know if you're having problems still,

    Colin

  • Clark SClark S Posts: 27Questions: 8Answers: 0

    I got it solved, pretty interesting actually.
    so I explicit type: post in the ajax block then pagination back to normal (w/o type definition server reads all records at once.)
    thanks anyways.

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    This is correct - by default DataTables will send a GET request for the data. But the scripts created by Generator work with POST data for form submitted information.

    They don't use server-side processing out of the box, hence a small change in the code that is generated is needed.

    Allan

Sign In or Register to comment.