asp:table equivalent of colspan???

R

rob merritt

Hi

I have some code to enter a textbox into a single tabelcell in a new
table row.
The rows above it have 3 cells /row. How can I programatically cause
the last row with only one cell and textbox span all three? code
bellow:

'this row should span 3 cells in the table
tblRow = New TableRow()
tblCell = New TableCell()
cellLabel = New Label()
cellLabel.Text = "<b>Comments:<br>"
tblCell.controls.add(cellLabel)
if rsTable("comments").ToString() is "" then
fieldCheck = "Null"
else
fieldCheck = rsTable("comments").ToString()
end if
celltextBox = new textBox()
cellTextBox.id = "commentsTB"
cellTextBox.Rows = 5
cellTextBox.Text = fieldCheck
tblCell.horizontalalign = horizontalalign.center
tblCell.Visible = True
tblCell.controls.add(celltextBox)
tblRow.Cells.Add(tblCell)
 
T

Teemu Keiski

Hi,

TableCell has equivalent ColumnSpan and RowSpan properties.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

Hi

I have some code to enter a textbox into a single tabelcell in a new
table row.
The rows above it have 3 cells /row. How can I programatically cause
the last row with only one cell and textbox span all three? code
bellow:

'this row should span 3 cells in the table
tblRow = New TableRow()
tblCell = New TableCell()
cellLabel = New Label()
cellLabel.Text = "<b>Comments:<br>"
tblCell.controls.add(cellLabel)
if rsTable("comments").ToString() is "" then
fieldCheck = "Null"
else
fieldCheck = rsTable("comments").ToString()
end if
celltextBox = new textBox()
cellTextBox.id = "commentsTB"
cellTextBox.Rows = 5
cellTextBox.Text = fieldCheck
tblCell.horizontalalign = horizontalalign.center
tblCell.Visible = True
tblCell.controls.add(celltextBox)
tblRow.Cells.Add(tblCell)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top