I have added a checkbox in the header to select all the records present in the grid.
While clicking the header checkbox all the records are getting selected but the header checkbox is still in unchecked state. So I am unable to deselect all the records.
Please see the below example:-