473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to create an InsertItemTemplate in detailsview programmatically?

Cas
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
Oct 21 '06 #1
0 3230

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: pjbates | last post by:
Hi, I've been using the GridView and DetailsView controls for a while, and I'm beginning to get annoyed by the redundancy of EditItemTemplate and InsertItemTemplate in many cases. In the...
12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
4
by: Frits van Soldt | last post by:
Hello, I hope somebody can help me with this! I have 2 listboxes in the edititemtemplate of a detailsview. In the databound event of the detailsview I would like to fill the listboxes...
0
by: André | last post by:
Hi, I would know how to change programmatically the forecolor of a particular field in detailsview. The detailsview is created in asox file. In the code-behind, i tried this: Protected Sub...
0
by: Cas | last post by:
Hi, I defined a detailsview in insertmode in the .aspx file. In the code-behind, i created 6 fields and adding them to the detailsview. Independantly of the detailsview, I use the datareader to...
0
by: Cas | last post by:
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...
0
by: Cas | last post by:
Hi, I made programmatically 30 InsertItemTemplates for a detailsview in insert mode for a websurvey. On the detailsview, i can see the 30 textboxes and the labels with "This is question x" . The...
2
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created...
3
by: =?Utf-8?B?QW5nZWw=?= | last post by:
I seem to understand how the control works as long as I mated to SqlDataSource or ObjDataSource it works fine. But I do not want to flatten my design in this manner. I am interested in how I can...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.