dataTables showing too much lines or not reloading with new data
dataTables showing too much lines or not reloading with new data
CptFantastic
Posts: 2Questions: 0Answers: 0
I admit it I'm new to JQuery and dataTables, but I think everybody has, one day , been new to it.
My problem is that I'm a bit puzzled on the behavior of dataTables.
I'm trying to show a list of strips in the dataTables. This list is based on the 'serie' id. I want to refresh the list based on a drop-down selection.
When I use the parameter 'serverSide : false' dataTables shows up correctly but it will not reload when I select another serie.
When the parameter 'serverSide: true' is set the reload works fine but the table shows all the lines (note that the bottom information show i.e. 'Showing 1 to 5 out of 20 elements' which is wrong).
Running examples are
http://testsite.bigm-web.com/liste-series_ajax_datatables_noserverside.php
http://testsite.bigm-web.com/liste-series_ajax_datatables_serverside.php
And the source codes
http://testsite.bigm-web.com/sources/?M=A
I'm using JQuery 1.8.2 and dataTables 1.9.4.
So if anybody can explain why this behavior with serverSide param on (I know I read in one of the threats that with serverside processing dataTables is not doing the work -or something like that- but I think it should still follow the rules that have been set => show 5 lines
If anybody can tell me how I can have my table reloaded when I make a new selection in my drop-down whith the serverSide param set to false I'll be happy.
Sincerely yours
Marc
My problem is that I'm a bit puzzled on the behavior of dataTables.
I'm trying to show a list of strips in the dataTables. This list is based on the 'serie' id. I want to refresh the list based on a drop-down selection.
When I use the parameter 'serverSide : false' dataTables shows up correctly but it will not reload when I select another serie.
When the parameter 'serverSide: true' is set the reload works fine but the table shows all the lines (note that the bottom information show i.e. 'Showing 1 to 5 out of 20 elements' which is wrong).
Running examples are
http://testsite.bigm-web.com/liste-series_ajax_datatables_noserverside.php
http://testsite.bigm-web.com/liste-series_ajax_datatables_serverside.php
And the source codes
http://testsite.bigm-web.com/sources/?M=A
I'm using JQuery 1.8.2 and dataTables 1.9.4.
So if anybody can explain why this behavior with serverSide param on (I know I read in one of the threats that with serverside processing dataTables is not doing the work -or something like that- but I think it should still follow the rules that have been set => show 5 lines
If anybody can tell me how I can have my table reloaded when I make a new selection in my drop-down whith the serverSide param set to false I'll be happy.
Sincerely yours
Marc
This discussion has been closed.
Replies
Allan
The server-side processing option was mainly to see if my data gets updated, and it does, but why with simple ajaxSource the function fnDraw (even if I use the fnClearTable() function) will not update my dataTable ?