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

asked on Problem setting column widths

Hi. I am using the following 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
Avatar of Brijesh Gandhi
Brijesh Gandhi
Flag of India image

Link to home
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


Thanks very much
Thanks Jitendra