Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

how to get the gridview cells value which is located within contentplaceholder.....


Here its my code,


var textbox = document.getElementById("<%=txtModuleName.ClientID%>");
var Gridview = document.getElementById("<%=grvModule.ClientID%>");

for (var i = 1; i < Gridview.rows.length; i++) {

var currentRow = Gridview.rows[i];

alert(currentRow.cells[1].innerHTML);
alert(textbox.value);
if (currentRow.cells[1].value == textbox.value) {
alert(currentRow.cells[1].value);
}
}


here alert(currentRow.cells[1].innerHTML) i am getting undefined value....


please help me
Posted

1 solution

do not try it directly with particular cell id in beginning just try with sample id like "i"..
 
Share this answer
 
Comments
Member 9155255 29-Oct-13 0:57am    
Thanks for your answer....but still if i add 'i' also me not getting the cells value....

please help me ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900