Author Topic: Getting all checked checkboxes externally  (Read 1922 times)

seb

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Getting all checked checkboxes externally
« on: November 19, 2018, 10:15:32 pm »
Hello,

I have checkboxes in a column called 'state', and I have a button below my grid that fetches all the ticked checkboxes.

However, this function does not work (it says "Uncaught TypeError: $(...).Checkbox is not a function"):

Code: [Select]
function getChecked() {
var boxes = $("#grid").Checkbox('state');
}

What is the correct way to access the Checkbox object when using an external button please?

Thank you,
Seb

seb

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Getting all checked checkboxes externally
« Reply #1 on: November 19, 2018, 10:19:59 pm »
Ok, so for anyone wondering, the method to call this function outside of the grid is as follows:

Code: [Select]
$grid.pqGrid("Checkbox", "state");