Add TextBox to GridView

G

Gabriel

Hello,

Is there a way to add a Textbox to a GridView ? I'd like one TextBox by
record.

Thanks,
 
G

Gabriel

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,
 
Joined
Oct 24, 2006
Messages
2
Reaction score
0
Textbox.text property inside detailsview returns empty

When I use findcontrol to get back my textbox I am able to retrieve the object, but my text property always comes back as empty, not null just empty. Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top