private void BtnPdfProvider_Click(object sender, RoutedEventArgs e) { var document = ProviderDataGrid.ExportToPdf(new PdfExportingOptions() { AutoColumnWidth = true, AutoRowHeight = true, ExcludeColumns = new List <string>() { "Id", "Password" } }); GeneratePDF(document); }