tags:

views:

172

answers:

2

In my c# app, I have a function to generate a PDF document using iTextSharp, which includes a table of figures. The table (PdfPTable specifically) is populated and then inserted into the document. After it has been populated, under certain conditions, I would like to remove one of the columns - does anyone know how to do this?

I know I could conditionally exclude cells when populating the table, but this will be quite complex in my situation. Thanks

A: 

Because the tables in iTextSharp are generated a cell at a time I think it would be much easier to programmatically remove the 'column' at generation time rather than after it.

Lazarus
A: 

I would test for the condition, then include or not include the column when the table is being created.

Tony Borf