Hi Every one
How to read textbox value in Gridview RowEditing Event I tried the following But it becomes Null Any one Help me Plz
GridViewRow row = (GridViewRow)gdvLocations.Rows[Convert.ToInt32(e.NewEditIndex)];
How to read textbox value in Gridview RowEditing Event I tried the following But it becomes Null Any one Help me Plz
GridViewRow row = (GridViewRow)gdvLocations.Rows[Convert.ToInt32(e.NewEditIndex)];
TextBox txtEditAddress = ((TextBox)row.Cells[1].Controls[0].FindControl("txtAddress"));

NarayanPosted Sep 1, 2011, 12:01 AM
In case of rowediting event.
First try to set the edit index of gridview, then bind the grid, after that you access your textbox like this
GridView1.EditIndex = e.NewEditIndex;
// Bind your gridview here
.......
//
TextBox txtAddress = GridView1.Rows[e.NewEditIndex].FindControl("txtAddress ") as TextBox;