GridViewRow changedRow = GridView1.Rows[e.RowIndex];
string firstName = ((TextBox)changedRow.Cells.Controls).Text;
: select the row in
at the offset in
Select the control at
. 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
type. This is known as casting and will only work if the control at that point actually is a
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.