Edit this page

Disable the Export of a Particular Column

When exporting with ExportToXlsx or ExportToPdf methods you can choose which columns to export by setting the ExcludedColumns property for the GridViewDocumentExportOptions. The property was introduced in Q3 2015 SP1. When a given column is added to this collection, it will not be exported.

Example 4: Disabling the export of a particular column:

var opt = new GridViewDocumentExportOptions()
{
    ShowColumnHeaders = true,
};
opt.ExcludedColumns.Add(grid.Columns[0]);

gridViewExport.ExportToPdf(stream, opt);
Dim opt = New GridViewDocumentExportOptions() With { _
    Key .ShowColumnHeaders = True _
}
opt.ExcludedColumns.Add(grid.Columns(0))

gridViewExport.ExportToPdf(stream, opt)
Was this article helpful? Yes No

Give article feedback

Tell us how we can improve this article

Dummy