Hi All,
I have fields in a gridview footer to add values but for some reason return false in javacript function is not stopping when I leave a field emtpy and try to add a row. The only way I found is to also do the following double validation in the code behind
so the insert does not take place.
Here is the javascript code in the head tag of the asp.net form:
function ValidateGrid() {
txtLocation = document.getElementById('<%=(gvDetails.FooterRow.FindControl("txtAddLocation")).ClientID %>');
if (txtLocation.value == 0) {
alert("Please Enter a Valid Location...!");
return false;
}
//Passed validation.
return true;
}
Here is the markup language for the ADD linkbutton:
<FooterTemplate>
<asp:LinkButton ID="lbtnAdd" runat="server" CommandName="ADD" Text="Add Location" Width=& ...
Go to the complete details ...