how to create an InsertItemTemplate in detailsview programmatically?

Discussion in 'ASP .Net Web Controls' started by Cas, Oct 21, 2006.

  1. Cas

    Cas Guest

    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
     
    Cas, Oct 21, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pjbates
    Replies:
    1
    Views:
    4,536
    Dan Vogt
    May 2, 2006
  2. Swetha
    Replies:
    0
    Views:
    3,702
    Swetha
    Nov 14, 2005
  3. Cas
    Replies:
    0
    Views:
    800
  4. Cas
    Replies:
    0
    Views:
    856
  5. Feege
    Replies:
    0
    Views:
    470
    Feege
    Dec 20, 2005
Loading...

Share This Page