<script language="javascript" type ="text/javascript" > function gvPostDatedChequeValidation(source, args) { var Grid = document.getElementById("<%=GridView1.ClientID%>"); if (Grid.Rows.Count>0 ) { args.IsValid = true; } else { args.IsValid = false; } } </script>
<asp:GridView ID="GridView1" runat="server"> </asp:GridView> <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="Fill Blank Cheque Details" ClientValidationFunction="gvPostDatedChequeValidation">*</asp:CustomValidator> <asp:Button ID="Button1" runat="server" Text="Button" />
if (Grid.rows.length>0 ) { }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)