473,498 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple ItemTemplates in one TemplateField

I am devloping a page that is using a GridView. Within one column of
the gridview I would like to place three different types of fields. I
need one label, one checkbox and one drop down list. Is this
possible, or do they need to be in separate columns for it to work?
Here is what I have so far and I can't get both fields to show up.
Only one.

<asp:TemplateField HeaderText="Reason of Rejection
(if rejected)" SortExpression="RejectReason" ItemStyle-
VerticalAlign="Bottom">

<EditItemTemplate>
<asp:CheckBox ID="CheckBox2"
runat="server" Checked='<%# Bind("GradeA") %>' />
</EditItemTemplate>
<ItemTemplate>
<asp:CheckBox ID="CheckBox2"
runat="server" Checked='<%# Bind("GradeA") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox6" runat="server"
Text='<%# Bind("RejectReason") %>' ></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
&nbsp;<asp:DropDownList ID="DropDownList5"
runat="server" SelectedValue='<%# Bind("RejectReason") %>' Enabled =
"false">
<asp:ListItem Value="">Select a
reason ....</asp:ListItem>
<asp:ListItem>Already exists</
asp:ListItem>
<asp:ListItem>Unclear\Confusing</
asp:ListItem>
<asp:ListItem>Error Found</
asp:ListItem>
<asp:ListItem>Inappropriate</
asp:ListItem>
<asp:ListItem>Not Creative Enough</
asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>

Jun 4 '07 #1
0 1106

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

Similar topics

2
10276
by: sck10 | last post by:
Hello, I am trying to programically make the following TemplateField ("MyTemplate") visible when the user clicks on the "Edit" Button using the PreRender handle event. My question is, how do...
2
2367
by: bigbrorpi | last post by:
Hi I have a FormView that contains a GridView. The GridView is populated from an ObjectDataSource. Two of the columns in the GridView are not bound, and the values used in Update mode come from...
1
2276
by: sloan | last post by:
I am programmatically adding BoundField's and TemplateField's to a GridView. I have it working fine. BoundField bf = new BoundField(); bf.DataField = "EmpID"; bf.HeaderText = "The Employee...
0
2735
by: joebob8000 | last post by:
This seems like a simple task, but my 6 year old roots in classic ASP must be causing me trouble with my current problem. I am looking to provide a search for users in which they can select...
6
2248
by: Class | last post by:
Hi all, I create a gridview dynamicly because I don't know the columns in advance. I use the Templatefield to create a linkbutton. Everything fine..I have the postbackurl and it works. But now...
3
2091
by: MikeB | last post by:
Hello, I have a content page that is from a Master page which has 2 content panes. How do I add my forms to the content page? Each pane needs a form but you can not have multiple form tags nor...
0
4635
by: sharonrao123 | last post by:
hello all, I have a parent gridview company and in this one a nested gridview people, Is it possible to allow the user to select one row or multiple rows from the people gridview using a check box...
2
10394
by: Elmo Watson | last post by:
I've converted a buttonfield to a TemplateField with a button in it Previously, in the Rowcommand, to identify the row when the ButtonField was clicked, I had this code: Dim index As Integer =...
0
828
by: Sody | last post by:
Hi, is in gridview any way how to control from codebehid if an itemtemplate in gridview will be set to visible = true / false ? here is an example of gridview with more itemtemplates ...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5460
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4586
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.