You can add a OnClientClick to the btnPayment like
<asp:button id="btnPayment" runat="server" text="Generate Bill" commandname="cPay" commandargument="<%#((GridViewRow)Container).RowIndex%>" onclientclick="return validateControls(this);"></asp:Button>
and then validate the controls on client side like:
function validateControls(rowObject)
{
if(valid){
return true;
} else {
return false;
}
}
More details
here.[
^]
I hope this would help you getting started!