473,799 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
<EditItemTempla te>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("project") %>'></asp:TextBox>
<asp:LinkButt on ID="LinkButton3 " runat="server"
OnClick="LinkBu tton3_Click">PV </asp:LinkButton>
</EditItemTemplat e>

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

<EditItemTempla te><asp:TextBox ID="TextBox1"
runat="server" Text='<%# Bind("project") %>'/><asp:LinkButto n
ID="LinkButton3 " runat="server"
OnClick="LinkBu tton3_Click">PV </asp:LinkButton>
</EditItemTemplat e>

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*********@di scussions.micro soft.comwrote in message
news:30******** *************** ***********@mic rosoft.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
<EditItemTempla te>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("project") %>'></asp:TextBox>
<asp:LinkButt on ID="LinkButton3 " runat="server"
OnClick="LinkBu tton3_Click">PV </asp:LinkButton>
</EditItemTemplat e>

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

<EditItemTempla te><asp:TextBox ID="TextBox1"
runat="server" Text='<%# Bind("project") %>'/><asp:LinkButto n
ID="LinkButton3 " runat="server"
OnClick="LinkBu tton3_Click">PV </asp:LinkButton>
</EditItemTemplat e>

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*********@di scussions.micro soft.comwrote in message
news:30******** *************** ***********@mic rosoft.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
<EditItemTempla te>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("project") %>'></asp:TextBox>
<asp:LinkButt on ID="LinkButton3 " runat="server"
OnClick="LinkBu tton3_Click">PV </asp:LinkButton>
</EditItemTemplat e>


Oct 8 '06 #3

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

Similar topics

3
13756
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. Everyone wants to do a java confirmation box when a user clicks the delete button. Fair enough, basic user design rules state that you should always confirm a delete action. There is also a consensus that the best way to do this is a template...
9
3532
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 creates -> checked="checked" disabled="disabled" What I need is more like this; <form id="form1" runat="server"> <div> <table>
2
7788
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 in the item template. I tried to initialize the selected value of the dropdown list with some lines of code in the grid_RowEditing event but I get an error that I do not understand. The error occurs at this line of code: String DelID =...
5
6455
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 dataset with a join query for the GetData() select method. I use ObjectDataStore to couple the GridView with the table adapter on the dataset. If I point the ODS at the child table, the GridView will bind to the "normal" select and I end up...
15
2197
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) Dim dSet As DataSet Dim sqlConn As SqlConnection Dim sqlDapter As SqlDataAdapter sqlConn = New SqlConnection("Data Source=AD\SQLEXPRESS;Initial
4
6735
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 event in GridView? I thought it would be RowCommand, but I can't get that event to fire with a check box field that I drag/drop in a template column in the ItemTemplate. 2.) For a Templated column, like a check box above, where do I tell it the...
2
8656
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 and then add a label (or any control) to the itemTemplate, and then end the editing. how can i do this dynamically in the code-behind. can someone please show me a small example, for instance adding a label to a ItemTemplate thanks,
2
2518
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 in the view (like a report) but when a user wants to edit/insert items I'd like to show a different layout and different controls based on the selected item type. For example, for some items I'd like to provide text boxes and for others I'd like...
7
6199
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 something. The buttons show up and post back, but the events do not fire. any help would be appreciated!!! Thank you. protected void gvEntitiesRowDataBound(object sender, GridViewRowEventArgs e) {
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10484
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10228
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6805
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.