Hello Guys,
Please find the below code for finding dropdown selected value placed inside gridview control using javascript.
function CheckDropdownValue() {
var grid = document.getElementById("");
var cell;
var isChecked;
isChecked = false;
if (grid.rows.length > 0) {
for (i = 0; i < grid.rows.length; i++) {
cell = grid.rows[i].cells[8];
cell11 = grid.rows[i].cells[0];
if (typeof cell != "undefined") {
for (j = 0; j < cell.childNodes.length; j++) {
// alert(cell.childNodes[j].type);
if (cell.childNodes[j].type == "checkbox") {
if (cell.childNodes[j].checked) {
isChecked = true;var checkbox = cell.childNodes[j];
var ddl = checkbox.parentNode.parentNode.childNodes[0].childNodes[0]
var ddltype = checkbox.parentNode.parentNode.childNodes[0].childNodes[0].type
if (ddl.value == 3) {
alert('Your message');
return false;}
} } } } } }
Thanks,
-Dam
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment