HOLA! lo unico que hago es :
protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
GridView2.SelectedIndex = e.RowIndex;
string cod = GridView2.Rows[e.RowIndex].Cells[2].Text.Trim();
rec.DeleteObjeto(cod);
GridView2.DeleteRow(e.RowIndex);
}
porque me da ese error??alguna idea??