Programmatic boolean if #master_checkbox element is checked

Is there a way to programmatically tell if the #master_checkbox has been selected? Maybe a way to register a click event, or a way to get access to that element directly?

The use case I’m trying to handle here is when the grid is populated with results spanning more than one page. I have some logic where I collect information on all selected rows and send it back to the server. With paginated results, only the page the user is currently viewing will return selected rows. Therefore I want to check if the master checkbox is selected so I can do some additional logic to collect data on rows not on the current page.

I couldn’t find an API method for this. For anyone else looking for this value, if you are using jQuery it can be retrieved with this:

$("#dhtmlxGridId input:checkbox").attr(‘checked’)