Murray Brown
asked on
ASP.net VB.net Problem setting column widths
Hi. I am using the following VB.net code to set the row heights and column widths of a table
that I am adding dynamically. The row height works but the column width does not.
For rowCtr = 1 To rowCnt
Dim tRow As New TableRow()
tRow.Height = 200
For cellCtr = 1 To cellCnt
Dim tCell As New TableCell()
tCell.Width = 200
that I am adding dynamically. The row height works but the column width does not.
For rowCtr = 1 To rowCnt
Dim tRow As New TableRow()
tRow.Height = 200
For cellCtr = 1 To cellCnt
Dim tCell As New TableCell()
tCell.Width = 200
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much
ASKER
Thanks Jitendra
The code given by brijesh is correct, & i would go with brijesh.
The main difference between your code and brijesh's code is brijesh has specified the units in which the browser recognizes the width part. here by explicitly specifying units in pixels mean you are directing browser to use 200 pixels width while rendering the table cell.
hope this helps.