How to stop automatic page jumping to page 1 ?
How to stop automatic page jumping to page 1 ?
Aditya14
Posts: 27Questions: 5Answers: 0
HI, When I am at any page other than 1 after few seconds it is jumping back to page 1 again
exactly to which file i need to make the change.
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Please tell anyone urgently
Hi Aditya14,
That's definitely not expected behaviour, so your code must be doing some kind of refresh on the table. If you give a live example we can take a look.
Cheers,
Colin
Hi, Collin can i share the code in jquery.DataTable.js ?
Actually whenever i am on any page other than 1 it is taking me back to page 1 in 10-15 secs
I tried to make bstateSave : true but it didnt worked ?
I am completly new to this where to make change i dont know
The best place to share the code for a live example is here: http://live.datatables.net/
saveState is for when you reload the page, the table returns to its previous state.
It sounds like you may be doing additional initialisations. If you could paste the code or get an example running, that would help to pinpoint the problem.
Cheers,
Colin
My guess is that you are either reloading the data in the table periodically (perhaps
ajax.reload()
) or your are re-initialising the table. Either way, as Colin says, we need a test case showing the issue.Allan
I am taking data from db dynamically still i tried to place the code http://live.datatables.net/jotexemo/1/edit plz check
I am using .net with it
This section here:
is saying to reload the table after 10 seconds... Soooo, I'm guessing this will be the culprit!
C
You are using
setInterval
to calldt.ajax.reload()
which by default resets the paging.Using the second example on
ajax.reload
you should be able to usedt.ajax.reload(null, false)
to retain the pageThanks it worked ... can we change css of it ?
I need this type of pagination can i ?
You would need to write that feature (using the
page()
method). A slider for paging is not something DataTables currently provides.Allan
@allan ... through any other jquery plugin i can use that functionality
As I say, I think you'd need to write the code for that using the
page()
method.page.info()
will give you the information you need for the end limit of the range.Allan