How to use checkbox selectall only current page?
How to use checkbox selectall only current page?
copsychus
Posts: 20Questions: 5Answers: 0
whenever use checkall ,it always selected checkbox in all pages, how to make it applied only current page? for example: whenever press checkall on page1, all checkboxes in page1 checked, but checkbox in page2 still unchecked , and even i deselect checkbox in page1, page 2 will be unaffected too. i use checkall given by datatables, is there any methods to do this? i already search whole forum but could't find solution at all.
columnDefs: [
{
width: "8%",
orderable: true,
targets: 0,
checkboxes: {
selectRow: true,
},
},
],
This discussion has been closed.
Answers
Actually it looks like you are using the Gyrocde Checkbox Plugin. Based on your description of the checkboxes working only on one page I'm guessing you are using Server Side Processing. You can see in this Gyrocode Server Side Processing example that the same issue occurs.
You will need to check with the developer of this plugin to see if he has a fix for this.
Kevin
You can set
selectAllPages
option tofalse
to disable selecting checkboxes from all pages.For example:
See more articles about jQuery DataTables on gyrocode.com.