This is a migrated thread and some comments may be shown as answers.

Using Print, is it possible to hide columns?

1 Answer 100 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lloyd Johnson
Top achievements
Rank 1
Lloyd Johnson asked on 18 Feb 2017, 02:08 PM

When I view the RadGridView, I can hide columns using the IsVissible=false method.  This appears to be ignored when printing.  Is this true and if so, is there another way that I can dynamically cause columns to not be printed?

If all the columns show, it bleeds to a second page and if I force all columns to print on a single page, the font is simply too small to read.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 21 Feb 2017, 03:25 PM
Hello,

If you're using the approach suggested in the Print and Print Preview demo from the WPF Controls Samples, you can use the ExportToWorkbook's overload and pass an instance of the GridViewDocumentExportOptions class.

Then, using the ExcludedColumns property, you can disable the export of particular columns to the workbook and respectively, disable their printing.

Please let me know whether this approach would work for you.

Regards,
Dilyan Traykov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Lloyd Johnson
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or