1
Answer

java script

sameer gadade

sameer gadade

12y
873
1
i want to get value in user control after selecting from grid view i have done it for
 textbox ie i got values in text box but unable to get values in user controls
here is sample code.
please help me

 function assignValuecomments(rowIndex)
{
//getting value of first cell
document.getElementById("<%=txtCommentsCommentID.ClientID %>").value = document.getElementById("<%=GridViewStudent.ClientID %>").rows[parseInt(rowIndex)].cells[0].innerText
//second cell of gridview
document.getElementById("<%=txtCommentsComment.ClientID %>").value = document.getElementById("<%=GridViewStudent.ClientID %>").rows[parseInt(rowIndex)].cells[1].innerText
//third cell
document.getElementById("<%=txtCommentsAddedOn.ClientID %>").value = document.getElementById("<%=GridViewStudent.ClientID %>").rows[parseInt(rowIndex)].cells[2].innerText
}
 



Answers (1)