i have the below code .
i wanted to have a master checkbox which selects all the rows in the current page
and as soon as master checkbox is clicked i need to display an alert saying
are you sure you want to select all the rows ?
Note: the alert should be displayed before updating the master checkbox and rows and if i select yes on the alert then it should update master checkbox and rows or else it should be closed and the state of the checkbox in master and rows should be as it is.