This is a simple problem that I don't understand why datatables breaks on.
I have a basic table with some columns. The first column has checkboxes, one for each row. All the boxes start off checked.
The datatable has server side processing checked.
"bProcessing": true
"bServerSide": true
Now when I un-check a box all seems well.... But when I page to the next row of items and come back with the pagination controls my unchecked box "magically" checks itself again. VERY annoying and a surprisingly simple problem for such an advanced product.
I noticed that if I un-check a box then page to the next set of rows and THEN put a space in the filter input field... then paginate back to my original set of rows where I checked the box... the box is correctly not checked!
So something happens when you put something in the filter input field that causes the datatable to sync up with the server and get the checkboxes working right between paginations.
The answer then for my problem would seem that after a box is checked I simply need to call "some method" that will make the datatable sync up much like when you put a space in the filter input field.
I tried:
fnDraw() - Doesn't call the server... so that's not it.
fnGetData() - Doesn't call the server .. so that's not it.
fnGetNodes() - Doesn't call the server.. so that's not it.
fnReloadAjax() - Doesn't call the server.. so that's not it.
fnFilter() - DOES call the server... but doesn't work because if you are on page 2+ you get reset back to page 1.
What call could I do that will make the datatable actually sync up with the server and my boxes will have their state correct?
Thanks,
LiquidPractice
I have a basic table with some columns. The first column has checkboxes, one for each row. All the boxes start off checked.
The datatable has server side processing checked.
"bProcessing": true
"bServerSide": true
Now when I un-check a box all seems well.... But when I page to the next row of items and come back with the pagination controls my unchecked box "magically" checks itself again. VERY annoying and a surprisingly simple problem for such an advanced product.
I noticed that if I un-check a box then page to the next set of rows and THEN put a space in the filter input field... then paginate back to my original set of rows where I checked the box... the box is correctly not checked!
So something happens when you put something in the filter input field that causes the datatable to sync up with the server and get the checkboxes working right between paginations.
The answer then for my problem would seem that after a box is checked I simply need to call "some method" that will make the datatable sync up much like when you put a space in the filter input field.
I tried:
fnDraw() - Doesn't call the server... so that's not it.
fnGetData() - Doesn't call the server .. so that's not it.
fnGetNodes() - Doesn't call the server.. so that's not it.
fnReloadAjax() - Doesn't call the server.. so that's not it.
fnFilter() - DOES call the server... but doesn't work because if you are on page 2+ you get reset back to page 1.
What call could I do that will make the datatable actually sync up with the server and my boxes will have their state correct?
Thanks,
LiquidPractice