Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

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
ASKER CERTIFIED SOLUTION
Avatar of Brijesh Gandhi
Brijesh Gandhi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jitendra patil
Hi  murbro,

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.
Avatar of Murray Brown

ASKER

Thanks very much
Thanks Jitendra