GridViewRow changedRow = GridView1.Rows[e.RowIndex];
string firstName = ((TextBox)changedRow.Cells[1].Controls[0]).Text;
changedRow
: select the row in
GridView1
at the offset in
e.RowIndex
Select the control at
changedRow.Cells[1].Controls[0]
. That is select the second cell in the row item. That cell (I assume) contains a number of controls, so you are selecting the first one (offsets start at zero). You then tell the compiler to assume that the resulting object is a
TextBox
type. This is known as casting and will only work if the control at that point actually is a
TextBox
or something derived from it.
But these are basic C# concepts which you should have been taught first. I suggest you have a chat with your teacher about this.