Trying to run a function on each change of a datatable page (dynamic loading).
onDataRequest will run when data is pulled from the server, but not when going back to a previous page (i.e. data has already been loaded).
onAfterRender is closest - it runs every time the page is changed, however it runs twice (or even more than twice if sorting) whenever data is pulled from server.
How best to capture (just once) when the page is changed?
It is not easy actually, as there is no straight event handler for such action. We will add the onChange event to the pager, so it will be easier in the next update.
If you have a support subscription, please contact us directly, we will provide the updated build ASAP