473,564 Members | 2,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid edit textboxes

Hey all,

I have a datagrid on an asp.net page and I'm using the in-line editing
feature where you can edit a value right on the datagrid. I was wondering if
I can make the textboxes a smaller width. If so, how please?

thanks,
rodchar
Nov 18 '05 #1
2 1209
One way is to specify the controls for the edit mode using a template, and
then set the width of the Texbox - for example:
<EditItemTempla te>
....
<ASP:TextBox id="txtTitle" Text='<%# Container.DataI tem("Title") %>'
size="46" runat="server" /><br />
....
</EditItemTemplat e>

this code is form this example:
http://www.daveandal.net/books/8900/...-datalist.aspx
which has a [view source] link.
"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:5E******** *************** ***********@mic rosoft.com...
Hey all,

I have a datagrid on an asp.net page and I'm using the in-line editing
feature where you can edit a value right on the datagrid. I was wondering if I can make the textboxes a smaller width. If so, how please?

thanks,
rodchar

Nov 18 '05 #2
thank you.

"Alex Homer" wrote:
One way is to specify the controls for the edit mode using a template, and
then set the width of the Texbox - for example:
<EditItemTempla te>
....
<ASP:TextBox id="txtTitle" Text='<%# Container.DataI tem("Title") %>'
size="46" runat="server" /><br />
....
</EditItemTemplat e>

this code is form this example:
http://www.daveandal.net/books/8900/...-datalist.aspx
which has a [view source] link.
"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:5E******** *************** ***********@mic rosoft.com...
Hey all,

I have a datagrid on an asp.net page and I'm using the in-line editing
feature where you can edit a value right on the datagrid. I was wondering

if
I can make the textboxes a smaller width. If so, how please?

thanks,
rodchar


Nov 18 '05 #3

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

Similar topics

8
2322
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="top"> <ItemTemplate><%# CType(Container.DataItem("DateStatut"),DateTime).ToString("yyyy-MM-dd")...
1
1336
by: Pavel Gusak | last post by:
Hello. I've found DataGrid built-in edit functionality useless. My DataGrid has 9 columns, and is shown just nice until I press 'Edit' on a row. ASP.NET creates 9 TextBoxes, all the same very big size, so my table becomes 3-screen-wide or so. How can I set size for the TextBoxes? Thanks.
1
1207
by: Demetri | last post by:
I have a datagrid on an aspx page with one column added via property builder - the edit/update/cancel. In addition there is a dropdownlist which has a list of table names. Upon selecting one of the table names a post back is fired. During the post back the datagrid has columns added to it dynamically to represent each of the columns in the...
2
5918
by: Fluxray | last post by:
--Background: I have a webform including a datagrid. The datagrid is using template. Its ItemTemplate is used to display a look-up-table with labels. its EditItemTemplate is used to edit a row in the look-up-table with textboxes. I have a linkbutton in each row (causevalidation = false) named 'Edit' to post the page back such that the page is...
3
1625
by: Leo | last post by:
I have a datagrid with the first column as a Edit,Update,Cancel button column. The other 5 columns are template columns. When I click the Edit button in IE6 the row correctly displays the controls defined in the <EditItemTemplate> however when I right click and do a view source I cannot find any of the input textboxes in the source. I have...
2
1335
by: Shankar Mani via DotNetMonster.com | last post by:
Hi folks, I am facing a problem while using a DataGrid. I have a webform with a datagrid containing two text boxes for edit viz., countrycode and country name. Like wise I have two more text boxes for Adding a new row in the grid, remember these all the four text boxes are inside the Grid. Also I am attaching Required Field Validators to all...
1
1331
by: David Sagenaut | last post by:
Can I set a whole datagrid in edit mode, like a table? I can edit the data in the datagrid. After done, I can click the save button to save the data into a datasousce. I don't want to used the build-in edit function in the datagrid in which you only can edit one line at a time. I want to edit whole datagrid and save it just once. Thanks...
0
1745
by: Erik | last post by:
Why isn't my update method getting called? Pasted below is an aspx from a 1.1 application I'm working on. It has two textboxes and a button for inserting data into the database, and a datagrid for editing and deleting data. When a user clicks on the "Edit" button in the datagrid, Edit() method is called and the appropriate row is changed...
9
2711
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the code: <script runat="server"> Dim sqlConn As New SqlConnection(".....") Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not...
6
3339
by: rn5a | last post by:
When the EditCommandColumn in a DataGrid is clicked, all the BoundColumns get replaced by TextBoxes so that users can alter the data. By default, the Text in the TextBoxes are left-aligned. Is there any way by which the Text in some of the TextBoxes, not all, be center-aligned or right-aligned? Please note that I am referring to the...
0
7888
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. ...
0
8106
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...
1
7642
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...
0
7950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
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...
0
3643
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...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.