TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
muthukumar Durai
NA
20
9.2k
javascript for dropdownlist inside gridview
Feb 16 2015 6:37 AM
validate dropdownlist inside grid view using javascript I use thes but it cannaot validate
function GridViewGL_newCompaniesValidation() {
try {
var grd = document.getElementById('<%=GdviewnewGL_Companies.ClientID%>');
// var ErrorMsg = "";
var Fieldvalue = true;
var objfocus = "";
if (grd != null) {
if (grd.rows.length != null) {
for (var i = 1; i < grd.rows.length; i++) {
var incr = i + 1;
if (incr <= 9) {
incr = '0' + incr;
}
var CompanyName = $("#" + grd.id + "_ctl" + incr + "_txtCompanyName");
var ddlIntranetSiteURL = $("#" + grd.id + "_ctl" + incr + "_ddlIntranetSiteURL").value;
var ddlAdministrator = $("#" + grd.id + "_ctl" + incr + "_ddlAdministrator").value;
if (CompanyName.val() == '') {
if (Fieldvalue == true) {
objfocus = CompanyName;
CompanyName.css({ "border": "1px solid #E80001" });
Fieldvalue = false;
ErrorMsg(Fieldvalue);
}
}
if (ddlIntranetSiteURL == "---Select---") {
if (Fieldvalue == true) {
objfocus = ddlIntranetSiteURL;
ddlIntranetSiteURL.css({ "border": "1px solid #E80001" });
Fieldvalue = false;
ErrorMsg(Fieldvalue);
}
}
if (ddlAdministrator == "---Select---") {
if (Fieldvalue == true) {
objfocus = ddlAdministrator;
ddlAdministrator.css({ "border": "1px solid #E80001" });
Fieldvalue = false;
ErrorMsg(Fieldvalue);
}
}
}
return Fieldvalue;
// alert(Fieldvalue);
}
}
} catch (e) {
alert(e.message);
}
}
Reply
Answers (
1
)
windows form in c# dynamically create multiple buttons
how to upload a document file in the text box