New to Telerik UI for WPF? Download free 30-day trial

Disable Export of a 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) 
In this article