473,406 Members | 2,336 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,406 software developers and data experts.

TableCell and TableRow

Hello All,
Is there any way to make this happen...
Say I want to make a table with 3 rows. The first row has two TableCells
each with a width of 300. The second row has one TableCell with the width of
600. The final row again has two TableCells each with a width of 300.
When I try and implement this, the table comes out with the first cells on
rows 1 and 3 as 600 and not 300 as set in the code.

Here's a brief example of what I'm doing...
tr = new TableRow();
tc = new TableCell();
tc.Text = "Col 1";
tc.Width = 300;
tr.Cells.Add(tc);

tc = new TableCell();
tc.Text = "Col 2";
tc.Width = 300;
tr.Cells.Add(tc);

Table1.Rows.Add(tr);

tr = new TableRow();
tc = new TableCell();
tc.Text = "Divider Row";
tc.Width = 600;
tr.Cells.Add(tc);

Table1.Rows.Add(tr);

tr = new TableRow();
tc = new TableCell();
tc.Text = "Col 1";
tc.Width = 300;
tr.Cells.Add(tc);

tc = new TableCell();
tc.Text = "Col 2";
tc.Width = 300;
tr.Cells.Add(tc);

Table1.Rows.Add(tr);

Again, the above make all the first column cells width 600. I want them to
stay 300 and only the divider row cell be 600.
Thanks
Nov 16 '05 #1
0 3385

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

Similar topics

3
by: Rajeev | last post by:
Hi I can use the TableRow and TableCell class in C# while using Web forms. The same are not available while programming with Windows Forms. I have the folloowing code that works fine with Web...
2
by: George Durzi | last post by:
Consider this pseudo HTML from a web form <asp:Table> <asp:TableRow> <asp:TableCell> <asp:Table> <asp:TableRow> <asp:TableCell></asp:TableCell> <asp:TableCell></asp:TableCell>...
6
by: Mr. x | last post by:
Hello, I have the following aspx code : <form id = "main_form" runat = "server"> <asp:Table dir = "rtl" runat = "server"> <asp:TableRow> <asp:TableCell id =...
3
by: Andre | last post by:
Hi, Did someone know why this code does'nt work (The TableCell Width). The cell don't have 600 and 150 like writed in width="600" and width="150". <asp:datagrid id="DataGrid1" ...
6
by: hb | last post by:
Hi, I have a page bill.aspx and its code-behind bill.aspx.cs. On bill.aspx I have: === Select a month: <asp:dropdownlist runat="server" id="lstDate" autopostback="True" /> <br> <asp:table...
0
by: Diane Yocom | last post by:
I'm very new to ASP.Net and probably jumped in a little over my head, but... I'm trying to create a user control that will control navigation through my site. It's sortof like Amazon.com, where...
1
by: Gürkan Demirci | last post by:
Hi, i am using the VisualStudio FormDesigner to create an asp:table. I want to populate an asp:tablecell with different controls at runtime. In the codebehind file, there is an attribute for the...
1
by: Matthi | last post by:
I have an aspx page with a huge ASP Table in it. I need to add some properties to its TableCells, but the table was cerated with the designer, and not with custom code. I can create a...
4
by: frankentux | last post by:
Hi there, I'm losing hair trying to figure out how I can actually get the text out of an existing .ods file. Currently I have: #!/usr/bin/python from odf.opendocument import Spreadsheet from...
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
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,...
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...
0
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...
0
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...
0
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...

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.