La solucion como siempre es hacer un debug por la zona donde haces el getdatarow. Te envio el codigo que utilizo yo mas sencillo y claro que tu getdatarow por si te interesa.
Código:
DataRow fila= dsVariables.Tables[0].Rows.Find( dg.DataKeys[(int)e.Item.ItemIndex]);
fila["nombre"]= ((TextBox)e.Item.FindControl("txtNombre")).Text.Trim();