How to keep current page when refreshing grid with pipeline?

How to keep current page when refreshing grid with pipeline?

pPnaW29JAnTtpPnaW29JAnTt Posts: 2Questions: 1Answers: 0

I use pipeline to cache 5 pages on my grids: https://datatables.net/examples/server_side/pipeline.html

When user edits record on a modal dialog, I refresh the grid using: $('.grid').DataTable().clearPipeline().draw();

But that makes the grid go back to page 1. Is there a way to fetch records from server with pipeline but keep current page?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,173Questions: 26Answers: 4,923
    Answer ✓

    Checkout the draw() docs for the parameters you can pass to affect paging. Sounds like you want to pass false, for example:

    $('.grid').DataTable().clearPipeline().draw( false );
    

    Kevin

  • pPnaW29JAnTtpPnaW29JAnTt Posts: 2Questions: 1Answers: 0

    Works! Thank you!

This discussion has been closed.