How to force reaload and pass some additional data
How to force reaload and pass some additional data
Hi. Thanks for such a great component!
I have a datatables setup (1.5 b11) which goes to the server side to get the data. Is there any way to force reload of that data, and pass some additional parameters via get? I can make a get with fnReloadAjax (there are examples on this forum), but with those examples there are two problems:
1. It goes to the server two times, one the default one, and the one where I make my ajax call
2. I should post the datatables specific data, but can not get all the required data, since I really want to keep paging and sorting info (there is also some echo parameter and a lots of stuff).
I would appreciate any help on this one. Thanks!
I have a datatables setup (1.5 b11) which goes to the server side to get the data. Is there any way to force reload of that data, and pass some additional parameters via get? I can make a get with fnReloadAjax (there are examples on this forum), but with those examples there are two problems:
1. It goes to the server two times, one the default one, and the one where I make my ajax call
2. I should post the datatables specific data, but can not get all the required data, since I really want to keep paging and sorting info (there is also some echo parameter and a lots of stuff).
I would appreciate any help on this one. Thanks!
This discussion has been closed.
Replies
You can't called $().datatable() twice on the same element, as yo uhave seen, as this re-initialised your whole table. If you are using server-side processing, all you need to do is call fnDraw ( http://datatables.net/api#fnDraw ), and the table will be refreshed using the current parameters from the server.
Allan