Your method for finding the control is fine but the problem is in the way that you're creating the controls;
You are probably adding an ItemTemplate but not an EditItemTemplate, so for each ItemTemplate you add you need to also add an EditItemTemplate, (In this case as a TextBox control).