473,320 Members | 1,858 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,320 software developers and data experts.

GridView add multiple controls to edit item template

when I try to add two controls to an item template, I cannot figure out how
to keep them on a single line. the functionality is just fine but how do I
get the controls to render on a single line? No matter the width of the
template column width, they alyways render in seperate lines which alters the
row height.

thank you in advance
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("project") %>'></asp:TextBox>
<asp:LinkButton ID="LinkButton3" runat="server"
OnClick="LinkButton3_Click">PV</asp:LinkButton>
</EditItemTemplate>

Oct 7 '06 #1
2 16848
YOu should be able to pull the controls up, like so

<EditItemTemplate><asp:TextBox ID="TextBox1"
runat="server" Text='<%# Bind("project") %>'/><asp:LinkButton
ID="LinkButton3" runat="server"
OnClick="LinkButton3_Click">PV</asp:LinkButton>
</EditItemTemplate>

As long as the line breaks are in the middle of tags, IE is fooled into
sticking them on the same line. THe same is true with most, if not all
browsers.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com/

*************************************************
Think Outside the Box!
*************************************************
"Jerod Hatley" <Je*********@discussions.microsoft.comwrote in message
news:30**********************************@microsof t.com...
when I try to add two controls to an item template, I cannot figure out
how
to keep them on a single line. the functionality is just fine but how do I
get the controls to render on a single line? No matter the width of the
template column width, they alyways render in seperate lines which alters
the
row height.

thank you in advance
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("project") %>'></asp:TextBox>
<asp:LinkButton ID="LinkButton3" runat="server"
OnClick="LinkButton3_Click">PV</asp:LinkButton>
</EditItemTemplate>

Oct 7 '06 #2
Thank you for the reply. Unfortunatly the results are the same as before.
I copied and pasted the code from window. I am not sure that I understand
what you mean by the line breaks.

Thanks
Jerod

"Cowboy (Gregory A. Beamer)" wrote:
YOu should be able to pull the controls up, like so

<EditItemTemplate><asp:TextBox ID="TextBox1"
runat="server" Text='<%# Bind("project") %>'/><asp:LinkButton
ID="LinkButton3" runat="server"
OnClick="LinkButton3_Click">PV</asp:LinkButton>
</EditItemTemplate>

As long as the line breaks are in the middle of tags, IE is fooled into
sticking them on the same line. THe same is true with most, if not all
browsers.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com/

*************************************************
Think Outside the Box!
*************************************************
"Jerod Hatley" <Je*********@discussions.microsoft.comwrote in message
news:30**********************************@microsof t.com...
when I try to add two controls to an item template, I cannot figure out
how
to keep them on a single line. the functionality is just fine but how do I
get the controls to render on a single line? No matter the width of the
template column width, they alyways render in seperate lines which alters
the
row height.

thank you in advance
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("project") %>'></asp:TextBox>
<asp:LinkButton ID="LinkButton3" runat="server"
OnClick="LinkButton3_Click">PV</asp:LinkButton>
</EditItemTemplate>


Oct 8 '06 #3

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

Similar topics

3
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum....
9
by: hazz | last post by:
I want to display 'n' records for a table-driven data entry page. The first column should be readonly and the 2nd column, a checkbox WRITABLE (NOT READONLY). I can't use the gridview because it...
2
by: keithb | last post by:
I have dropdown list in a gridview column edit template. It works OK, except when I edit a row, the dropdown list does not initialize to the existing value that shows in the textbox that displays...
5
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
15
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
4
by: Chris Davoli | last post by:
I've got two questions on how to do things in the new GridView. I'm used to the DataGrid in ASP 1.1, so I need the equavalent in ASP 2.0 Gridview. 1.) What is the equavalent for Item Command...
2
by: rodchar | last post by:
hey all, you know in the gridView quick task menu how you have the option of taking a bound column and converting it into a TemplateColumn. Alright, once i do that i goto edit the template column...
2
by: bogdan | last post by:
Hi, Can a single GridView be 'connected' to DetailsView that renders itself differently based on the currently selected row? I have a GridView with rows that could be displayed in the same way...
7
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I'm adding subheadings to a gridview. Each sub head has a few link buttons. I'm adding the controls in the rowdatabound event code follows: sorry about the length here. I have to be missing...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.