Newbie to datatables... Refresh option for table grid using server side pagination

Newbie to datatables... Refresh option for table grid using server side pagination

i03604mi03604m Posts: 2Questions: 1Answers: 0

Is there an option to refresh the data in the grid in the following server side pagination scenario:

The grid data is from a server side file that has many rows/records (over million)... the table grid display lets says 20 rows.

if by chance someone on the server side changes the contents of one of the records currently being displayed in the gird. it would be nice to have a refresh option (button) to refresh the current data in the grid. in all likely hood the user would not be aware that a update has taken place, but if there was a refresh option, it would show the current data.

Just a thought. If this option is available i apologize for not seeing it.

Thanks in advance.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin
    Answer ✓

    Simply call draw() passing in false to keep the current paging (i.e. table.draw( false ) - which will do a redraw, and since you are using server-side processing, it will refresh the data).

    Allan

  • i03604mi03604m Posts: 2Questions: 1Answers: 0

    alan, thanks for you input....

This discussion has been closed.