is there anyway on how the program could determine if there is a selected row in a current gridview?

for example: i have one button and a gridview that allows selection, the scenario is that if there is no rows selected in the gridview the button would be disabled but when there is a row selected, the button would be enabled.

is there a way on how to do this? please helpp.
any answer would be appreciated!