Title: Question related to select all checkbox on datagrid Post by: Darrel on October 18, 2016, 07:23:48 AM Hello,
I'm stuck in a scenario in the datagrid. There are two scenarios: 1) When I click on the header checkbox, all the records get selected on the page. But when I submit the form, I get no values from the grid since it has not pushed any values into the array. 2) But in the current page, if I independently choose all the checkboxes on the grid one by one, without selecting the header checkbox, then the select all checkbox in the header also get's checked automatically. And when I submit, I get the values due to the onCheck function written during the datagrid initialization. Code snippet is as follows: Code: var checkedRows = []; Is it possible to attach some event/method to the header checkbox of the datagrid, so that I can get all the rows checked in the current page????? Also is it possible to add the elements in the array whenever the select all check box is ticked. Also if a pagination event occurs to another page, the elements should be added in the array automatically on pagination as well in case of select all checkbox being ticked????? Regards, Darrel. Title: Re: Question related to select all checkbox on datagrid Post by: stworthy on October 18, 2016, 08:36:29 PM Please attach the 'onCheckAll' and 'onUncheckAll' events. These two events fire when the user check or uncheck all the rows.
|