145 pts.
 To Access the details from gridview all row single cell
Hi friends, I have one gridview in which I bindinig data ,in gridview I have four BoundField  and one template field in template field I put Insert Item template which contains Textbox . What is my requrement ? at the submit button click I want access all Textbox value and store into Database. If anybody has solutiuon then please share it ........ Thanks

Software/Hardware used:
ASP.Net
ASKED: March 8, 2011  11:13 AM
UPDATED: August 12, 2011  12:06 PM

Answer Wiki:
foreach (GridViewRow gvr in this.GridView1.Rows) { //get value from template field, //5 is the index of your template field string textboxValue = ((TextBox)gvr.Cells[5].FindControl("textbox1")).Text; //update to db method }
Last Wiki Answer Submitted:  August 12, 2011  12:06 pm  by  Mygods   45 pts.
All Answer Wiki Contributors:  Mygods   45 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _