JQuery Datatable Pagination And State Save Issue
JQuery Datatable Pagination And State Save Issue
Hi,
I'm trying to maintain states of my checkbox cells(added a class to them on click event) in jquery, I do not want to maintain an array to hold elements that were modified in between pagination. I wanted to know if there is a way for me to dynamically shut off pagination.
I would like to do this on form submit, i want to shut off pagination and select all elements which were modified.
Any help would be appreciated.
I'm trying to maintain states of my checkbox cells(added a class to them on click event) in jquery, I do not want to maintain an array to hold elements that were modified in between pagination. I wanted to know if there is a way for me to dynamically shut off pagination.
I would like to do this on form submit, i want to shut off pagination and select all elements which were modified.
Any help would be appreciated.
This discussion has been closed.
Replies
On submit of my form i reset the index of pagination to first page. then i start gathering all my modified elements on that page and move to the next page, iteratively i gather all the modified elements without maintaing an array.
In this case i do not have to shut off pagination but still gather all my changes by redrawing and collecting.
Only question now for me is
1) can my script know how many page indexes are created so that my loop can run to the exact number of pages.
2) what is the difference between oTable.fnPageChange('next',true); and oTable.fnPageChange('next'); Can i switch to different pages without redraw, if this is possible user would not know i'm iterating through all pages.
Path followed to gather all elements
1) shut off filtering by oTable.fnFilter('');
2) move to 1st page of datatable
3) iterate through all pages and gather modified elements.
4)submit form.
Please let me know if this "way" would work for all browsers, are there any hidden things i need to be aware of while i'm manupilating a way to gather all modified elements.
The reason for me to do this is because i have checkboxes in cells of datatable. On selecting/deselecting a checkbox i'm toggling a class. In my case i would have to create a structure of all modified elements and add them to a table which Java Struts would read and pass information to server component.
Help is appreciated