I have a GridView with a couple of columns that I do not want to be exported to PDF (through iTextSharp).
How can I hide the columns I don't want exported before I export the data?
I have a GridView with a couple of columns that I do not want to be exported to PDF (through iTextSharp).
How can I hide the columns I don't want exported before I export the data?
Before exporting the data, do something like:
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