I have a GridView with several columns that I do not want to export to PDF (via iTextSharp).
How can I hide columns that I do not want to export before exporting data?
Before exporting data, do the following:
myGridView.columns.RemoveAt(index); //Index is the index of the column you want to remove myGridView.Databind();
or try
dataGridView1.Columns[index].Visible = false; // the index of the column to be hidden