2009-08-01 10 views
4

私は、(iTextSharpを介して)PDFにエクスポートしたくないいくつかの列を持つGridViewを持っています。GridViewから列を削除する

データをエクスポートする前にエクスポートしたくない列を非表示にするにはどうすればよいですか?データをエクスポートする前に

答えて

7

、のようなものを実行します。

myGridView.columns.RemoveAt(index); //Index is the index of the column you want to remove 
myGridView.Databind(); 
1

または

dataGridView1.Columns[index].Visible = false; // the index of the column to be hidden 
を試してみてください
関連する問題