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. Advertisements

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. Mark Stafford
    Replies:
    1
    Views:
    8,637
    Mark Stafford
    Aug 29, 2006
  2. Cas
    Replies:
    0
    Views:
    1,110
  3. Cas
    Replies:
    0
    Views:
    941
  4. Angel
    Replies:
    3
    Views:
    849
    Angel
    Dec 12, 2007
  5. Don
    Replies:
    3
    Views:
    1,490
  6. Peter Pan
    Replies:
    0
    Views:
    1,643
    Peter Pan
    Apr 13, 2009
  7. Cas
    Replies:
    0
    Views:
    947
  8. Feege
    Replies:
    0
    Views:
    744
    Feege
    Dec 20, 2005
Loading...