473,770 Members | 4,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

controlling individual textbox widths in a datagrid using a style sheet?

TB
Hi All:

I have this datagrid where space is very tight, and therefore I have to
make sure that everything fits within a fixed screen width regardless
of whether I am in list mode or in edit mode. But I have discovered
that it is not enough to simply specify the column widths by way of
'HeaderStyle-Width="25px" ItemStyle-Width="25px"'-type properties
inside in the <asp:BoundColum n> tags, because by default all the text
boxes in edit mode have the same length, greatly expanding the total
width of the datagrid each time I press the edit button.

So then I thought of creating style sheet entry called:

..MyListItem td input
{
font-family: Verdana;
font-size:9px;
width:25px;
}

and the call it from datagrid:
<EditItemStyl e CssClass="MyLis titem"></EditItemStyle>

But of course the problem is then that while this entry does control
the text box width, it is common for ALL the columns, rendering it
useless, because I need each of the textboxes to have the same width as
their corresponding column widths expressed in the <asp:BoundColum n
DataField="Fiel dname" HeaderText="Fie ldname" HeaderStyle-Width="25px"
ItemStyle-Width="25px"></asp:BoundColumn > tags.

Any suggestions will be highly appreciated.

Thanks,

TB

Oct 13 '05 #1
1 2346
"TB" <tb************ ********@yahoo. com> wrote:
<asp:BoundColu mn
DataField="Fie ldname" HeaderText="Fie ldname" HeaderStyle-Width="25px"
ItemStyle-Width="25px"></asp:BoundColumn > tags.

Any suggestions will be highly appreciated.


This group is about stylesheets, ask in an appropriate group like
something in the microsoft.asp.* hierarchy.

--
Spartanicus
Oct 13 '05 #2

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

Similar topics

20
4248
by: Jeff Nibler | last post by:
I'm trying to set the width of a textbox via a style sheet but it isn't working for Netscape 4.7 This is what the page looks like: <form> <input type="text" class="t1"> </form> This is what the style sheet looks like:
3
9472
by: Ronald S. Cook | last post by:
Hi all, I have an ASP.NET DataGrid wherein there is an edit link for each row. Upon clicking the link, certan fields in that row display in text boxes so that they may be edited. I would like some textboxes to be wider, some narrower. By default, they are all the same pre-defined width. Does anyone know how I can do this? Thanks very much,
1
1208
by: Robin | last post by:
With a page that is in gridlayout mode how do you dynamically position a text box to appear after a datagrid?
8
3523
by: tshad | last post by:
I cannot seem to get the asp:textbox to use classes. Style works fine. I am trying to set the textbox to act like a label in some instance so it doesn't have a border, readonly and the background is grey. I have a class set as: ..table2Label{ border-style:none; background-color:#F6F6F6; }
2
2057
by: TB | last post by:
Hi All: I have this datagrid where space is very tight, and therefore I have to make sure that everything fits within a fixed screen width regardless of whether I am in list mode or in edit mode. But I have discovered that it is not enough to simply specify the column widths by way of 'HeaderStyle-Width="25px" ItemStyle-Width="25px"'-type properties inside in the <asp:BoundColumn> tags, because by default all the text boxes in edit...
3
6477
by: Mike Fellows | last post by:
Im trying to set the column width of individual datgrid columns I can set the column widths of all the columns at once using Me.DataGrid1.PreferredColumnWidth = 100 But I am unable to set the individual column widths Also the source from where my data is coming from the first column contains a date and time i.e. 01/01/2003 12:00:00 but within the datagrid it displays 01/01/2003 and i need it
3
4543
by: natrajsr | last post by:
Hi, I want to load the data of a excel sheet or in the exact excel sheet format into a Rich TextBox control. I have already worked with loading WORD into a Rich TextBox. It is working fine.; But it is taking long time for our need. So we thoguht, we can find another better solution rather than that. Can anyone help me to find out how to load a excel sheet or in the
6
3372
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 alignment of the Text in the TextBoxes & NOT the alignment of the TextBoxes within the cells in the...
5
1956
by: vpravin | last post by:
Hi guys...i am a super noob with html and aspx.. i didnt start this project but i am modifying it... q: how do i change the width of a column: Thats the table which is within a text box <asp:Table id="regulatoryDetails" runat="server" Font-Size="X-Small" Width="400px" Height="8px"
0
9602
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...
1
10017
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
9882
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
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
5326
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
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.