aoData.push and adding info back to the request
aoData.push and adding info back to the request
Hey new user here :) Trying to figure all this out.
I wanted to do some Totaling for all the results that could be returned on the server side and then send it back in the response and update the footer.
(ie totals, differences, etc)
Is this possible?
in this example:
http://datatables.net/examples/example_footer_callback.html
It appears you are looping through the record set to calculate the totals for the page you are on. I want to have the totals for the entire record set. My project will involve very large record sets so I wanted to do the server side paging in MYSQL/Coldfusion and the totals.
Thanks a bunch in advance :)
I wanted to do some Totaling for all the results that could be returned on the server side and then send it back in the response and update the footer.
(ie totals, differences, etc)
Is this possible?
in this example:
http://datatables.net/examples/example_footer_callback.html
It appears you are looping through the record set to calculate the totals for the page you are on. I want to have the totals for the entire record set. My project will involve very large record sets so I wanted to do the server side paging in MYSQL/Coldfusion and the totals.
Thanks a bunch in advance :)
This discussion has been closed.
Replies
Welcome to that DataTables forums :-)
It certainly is possible to do what you are looking for. What you need to do is use a custom fnServerData function to act upon your summation return variables: http://datatables.net/usage/server-side#fnServerData
Here is a basic example which shows adding a new variable sent from the client to the server: http://datatables.net/examples/server_side/custom_vars.html . I realise that you want to go from server to client, but hopefully this will show you how fnServerData can be used. Basically in the callback function you can perform whatever DOM operation you need to update the footer at that point - then pass the data on to DataTables to complete the draw.
Hope this helps!
Regards,
Allan