【发布时间】:2009-08-01 06:48:36
【问题描述】:
我有一个 GridView,其中有几列我不想导出为 PDF(通过 iTextSharp)。
如何在导出数据之前隐藏不想导出的列?
【问题讨论】:
标签: c# asp.net itextsharp
我有一个 GridView,其中有几列我不想导出为 PDF(通过 iTextSharp)。
如何在导出数据之前隐藏不想导出的列?
【问题讨论】:
标签: c# asp.net itextsharp
在导出数据之前,请执行以下操作:
myGridView.columns.RemoveAt(index); //Index is the index of the column you want to remove
myGridView.Databind();
【讨论】:
或者试试
dataGridView1.Columns[index].Visible = false; // the index of the column to be hidden
【讨论】: