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

Open in new window

Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
You are mixing telerik controls and generic html controls. I think you need to use one of these.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.