Change the displayed page after an ajax call
Change the displayed page after an ajax call
Hi,
I'm using datatables 1.10 using ajax request to get all the data from the server so that paging is done only on the client.
I want to be able to change the default page (on the client), so that for example when I reload ajax the UI will display page 2 initially.
I tried to set displayStart=20 for example to display the 3rd page as the ajax call returns, but it still shows the first page.
I also tried to call the page() function, but couldn't find the right callback to use for that.
Pls advise
Thanks
Answers
The
displayStart
option works with ajax loaded data:http://live.datatables.net/deverima/1/edit
The callback to use once the table is initialized is
initCompete
. Or you can useinit
.Please update the test case to replicate the issue or post a link to your page so we can help debug.
Kevin