I have a 3 GridvViews one is To,another one is Cc and Bcc ,
After enter the values to Grids,i want to save those Records.
Now what is my question is ---at the time of saving Check the data is there in 3 Grids or not.
ex:
i insert records to To,but i'm not insert records to Cc,Bcc ,then it shows the "error enter atlest one record..." .I want like this for this i wrote Script function and call the Script in to Save button by using OnClientClick Property.
After enter the values to Grids,i want to save those Records.
Now what is my question is ---at the time of saving Check the data is there in 3 Grids or not.
ex:
i insert records to To,but i'm not insert records to Cc,Bcc ,then it shows the "error enter atlest one record..." .I want like this for this i wrote Script function and call the Script in to Save button by using OnClientClick Property.
Code:
<JavaScript >
function Validate() {
var To = document.getElementById("<%= gvTo.ClientID %>");
var Cc = document.getElementById("<%= gvCc.ClientID %>");
var Bcc = document.getElementById("<%= gvBcc.ClientID %>");
if (To.rows.length < 1 || Cc.rows.length < 1 || Bcc.rows.legth < 1) {
alert("please enter at least one record");
}
else {
alert("Continue..");
}
}
</JavaScript>
Comment