Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Print File With Spreadsheet

$
0
0
Hello Dan Ove,

In order to print a RadSpreadsheet, the control must be present in the visual tree. You could place the document in a panel with sizes 0x0 to prevent showing it to the user and measure it in the desired size:
RadSpreadsheet sheet = new RadSpreadsheet();
this.grid.Children.Add(sheet);
 
ExportWhat exportSettings = new ExportWhat();
PrintWhatSettings settings = new PrintWhatSettings(exportSettings, false);
 
sheet.Measure(new Size(sheet.MinWidth,sheet.MinHeight));
sheet.Print(settings);

Hope this helps.

Regards,
Tanya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>