when i add a new button in button panel, i set OnClientClick as your example code, however, it take no effect besides a no message popup window. the code snippet is shown below.
<Button CommandArgument="View test" Type="Button" Text="View test" >
<OnClientClick returnValue ="window.confirm('Are you sure to delete the record? ')" />
if there is any matters need attention, please let me know.
with no GridSelectionRequired configurated, when user click the button in button panel , whether it don't need to select one row in GridView Panel before Aggregate Panel is shown.