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

Problem with cell with in a table

I have started using a System.Web.UI.WebControls.Table control

In this table I have programmatically added web controls (mostly textboxes)
to all the cells of a particular column. (The entire table is defined in the
VB code.)

Nothing I do seems to affect the width of the column or the textboxes within
the column. I have tried adding to the attributes of both the textbox and
the cell. (Attributes.Add("Width", "50px").

What am I forgetting?
Apr 7 '06 #1
2 1303
DWS
B Chernick
Look in the html rendered to the browser for <td width="50px"> to verify
your getting the correct output.

both the tablecell and htmltablecell have a width attribute you can use and
both are used differently.

tablecell.width = new unit(50)
htmltablecell.width = "50px"

Have a great weekend.
DWS

"B. Chernick" wrote:
I have started using a System.Web.UI.WebControls.Table control

In this table I have programmatically added web controls (mostly textboxes)
to all the cells of a particular column. (The entire table is defined in the
VB code.)

Nothing I do seems to affect the width of the column or the textboxes within
the column. I have tried adding to the attributes of both the textbox and
the cell. (Attributes.Add("Width", "50px").

What am I forgetting?

Apr 7 '06 #2
Thanks. I've got it now.

(Wrong call. For some reason I was using Attributes.Add rather than a
straightforward .Width=Unit.Pixel(50) on the control itself.)

"DWS" wrote:
B Chernick
Look in the html rendered to the browser for <td width="50px"> to verify
your getting the correct output.

both the tablecell and htmltablecell have a width attribute you can use and
both are used differently.

tablecell.width = new unit(50)
htmltablecell.width = "50px"

Have a great weekend.
DWS

"B. Chernick" wrote:
I have started using a System.Web.UI.WebControls.Table control

In this table I have programmatically added web controls (mostly textboxes)
to all the cells of a particular column. (The entire table is defined in the
VB code.)

Nothing I do seems to affect the width of the column or the textboxes within
the column. I have tried adding to the attributes of both the textbox and
the cell. (Attributes.Add("Width", "50px").

What am I forgetting?

Apr 7 '06 #3

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

Similar topics

2
by: Andy | last post by:
Hi all, Sorry to present you all with another boring problem but I've spent all day trying to get this to work with no success. Below is a function to which I pass the argument &$myCell (which...
1
by: Thanks | last post by:
I have a routine that is called on Page_Init. It retrieves folder records from a database which I display as Link Buttons in a table cell. I set the table cell's bgcolor to a default color (say...
0
by: Thomas Scheiderich | last post by:
I have a table that has 3 image slices. The middle slice changes size based on size of browser window. This works great. My client wants the date to show over the image on the right. So what I...
4
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
4
by: Hiwj | last post by:
I am having a problem with a cell in a table in ASP.NET which used to work OK in classic ASP. I have one cell in a row where the width should be 22 pixels and the other cell should take up the...
8
by: chrisoftoday | last post by:
Hi, I'm having trouble with some white space that's appearing in my table. I can't seem to spot the problem, it'd be great if someone could help. The HTML code (ignore the PHP, it shouldn't be...
3
by: Phil | last post by:
I'm trying to make a 4 x 13 table in html, but it won't format correctly... maybe someone can see what I'm doing wrong. <table border="1"> <tr> <td colspan="3" rowspan="5">Cell 1, 1</td> <td...
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
6
by: Murray Hopkins | last post by:
Hi. THE QUESTION: How do I get a reference to my Object when processing an event handler bound to an html element ? CONTEXT: Sorry if it is a bit long. I am developing a JS calendar tool....
3
by: Harry | last post by:
Using IE7, I'm trying to display a table in a horizontal manner by floating the rows. The following html does not work, displaying the table vertically as if the rows were not floated. This same...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.