How to set/save data for rows not being shown using server side processing (check all checkboxes)

How to set/save data for rows not being shown using server side processing (check all checkboxes)

shawnjames95shawnjames95 Posts: 6Questions: 2Answers: 0

Hello,

I have code that creates uses server-side processing and alters the data in order to create a checkbox for each row. Additionally, I have a check all and a uncheck all button. The problem is, since the content of pages not being shown does not exist in the DOM when using server-side processing, it can only select the boxes on the page. Also, when I go forward a page, then back again, it does not save the state of the checkbox (checked or unchecked).

My current idea that I have started is a workaround hack shown in the link below. It will keep track of which ones are checked and unchecked, and also keep track of whether all or none were last checked, which makes it visually work perfectly. However, if I want to log all checked ones to the console I still have no way of logging values that are not in the visible DOM. If it were possible to get all filtered values through the API this would be workable, however, I am still not sure that this is the best method.

Sending a custom AJAX request to the server_processing.php asking for all filtered values would be a way to get this information, but it would be preferable to just use the API.

http://live.datatables.net/qopupopu/2/

How would I go about achieving what I want to achieve?

This discussion has been closed.