datatables for large data

datatables for large data

kulkarni_ashkulkarni_ash Posts: 35Questions: 8Answers: 0

Hi
We are expecting to get more than 10,000 rows of data for tables and need to have pagination , sort and search for this table.
I see an option to use server side processing for this kind of table, the question i have are as below
1. How does the search function works , does it make database call for searching?
2, How can i get total number of pages,
3, when writing stored procedure does this stored procedure return only 25 or 50 rows at a time and then gets next when user clicks next or previous
4, how does the counter work, who keeps track of what data to get?

Does anyone have sample stored procedure code of how to achieve this.

Answers

  • developer99developer99 Posts: 1Questions: 0Answers: 0

    Take a look at https://datatables.net/examples/server_side/. It should answer some of your questions.

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin
    1. How does the search function works , does it make database call for searching?

    Yes. See the server-side processing manual.

    2, How can i get total number of pages,

    Your SQL would get the number of rows in the table and DataTables computes the pages. Again, see the server-side processing manual.

    3, when writing stored procedure does this stored procedure return only 25 or 50 rows at a time and then gets next when user clicks next or previous

    It should return the number requested by DataTables. This is also in the manual :-)

    4, how does the counter work, who keeps track of what data to get?

    What counter?

    Allan

This discussion has been closed.