Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

asked on

How to create COLGROUP and COL programmatically to add to table

I am creating a table element (for PDF export) and I need to add a COLGROUP with two COL elements.

How can I add those programmatically?

I have tried these, but evidently colgroup does not have an .Add method. I also have seen the first recommended way of creating a column, and guessed at the second, so I don't know which of those should be used, etc. Any ideas? thanks!

            Dim table As New Table()
            Dim colGroup As New GridColumnGroup()
            Dim Col As New HtmlGenericControl("COL")

            Dim col As GridColumn
            Dim col2 As GridColumn
            colGroup.Add(col)
            colGroup.Add(col2)
            table.Add(colGroup)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland 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