Hello there,
Try changing this line
GridViewRow dgvChildDocuments = (GridViewRow)((TextBox)sender).Parent.Parent;
to this
GridViewRow dgvChildDocuments = (GridViewRow)((TextBox)sender).NamingContainer
and if
dgvChildDocuments.RowIndex
is still zero, then also try
dgvChildDocuments.DataItemIndex
Hope it helps.
Good luck
Azee