Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > how to create an InsertItemTemplate in detailsview programmatically?

Reply
Thread Tools

how to create an InsertItemTemplate in detailsview programmatically?

 
 
Cas
Guest
Posts: n/a
 
      10-21-2006
Hi,

I want to create a InsertItemTemplate in a detailsview (only
insertmode)programmatically.
I first defined a Template, then i tried to create within that templatefield
a InsertItemTemplate (but i don't know how), and finally a textbox.

I did this: (Detailsview1 is defined in the .aspx file)

Dim tfield As TemplateField
Dim tb As TextBox
tfield = New TemplateField
tb = New TextBox
tb = tfield.InsertItemTemplate
DetailsView1.Fields.Add(tfield))
DetailsView1.Fields(0).HeaderText="ok"
.....

But it doesn't work.No error, but i can't see (and use) the texbox. All i
see is the headertext ("ok").


Thanks for help
Cas


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
how to create an InsertItemTemplate in detailsview programmatically? Cas ASP .Net 0 10-21-2006 09:04 PM
how to create an InsertItemTemplate in detailsview programmatically? Cas ASP .Net Web Controls 0 10-21-2006 09:04 PM
Can I combine an EditItemTemplate and InsertItemTemplate? pjbates ASP .Net 1 05-02-2006 03:00 AM
DetailsView - Changing to Insert Mode (Not By Using the Insert Button In the DetailsView Control) Feege ASP .Net Web Controls 0 12-20-2005 12:28 AM



Advertisments