Gabriel,
To get to the textbox inside a Gridview, you need to use FindControl to
find the textbox inside a control and cast it to TextBox.
Hope this helps,
http://www.codeproject.com/dotnet/Ac...lsInsideGr.asp
Gabriel wrote:
> > By "adding" a textbox, I assume you are referring to allow inserting of
> > records (i.e. an Add interface to a Gridview?) Or are you talking about
> > the fields that appear when you click Edit? Could you be more specific?
>
> In fact for each record, I'd like add a TextBox. When I display the grid the
> all textbox are empty, I add something in manually. I have a ButtonField to,
> when I click on it in the event RowCommand, I'd like recover the value of
> the textbox.
>
> Add the Textbox ok :
> <asp:TemplateField HeaderText="Qty">
> <ItemTemplate>
> <asp:TextBox ID="tbQty" runat="server" Width="25px"
> MaxLength="3" />
> </ItemTemplate>
> <ItemStyle Width="25px" HorizontalAlign="Center"/>
> </asp:TemplateField>
>
> That's work, the last problem if recover the value from the RowCommand
> event.
>
> Thanks,