Hello all. I currently have a grid that the user can view a print preview of the data before printing. Is it possible to have a title or time stamp on the preview?
Hello,
What you could do in your case is to use the InitializePrintPreview event of the grid. In this event you can format the preview in various ways thanks to the CancelablePrintPreviewEventArgs argument . You could set the title of the preview dialog by adjusting DialogCaption property of PrintPreviewSettings object, you could use code like:
e.PrintPreviewSettings.DialogCaption = DateTime.Now.ToString();
In order to display footer or header you could adjust PageFoother,PageHeader properties of PrintPreviewSettings of the argument. More information about those properties you will find on the following links:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.LogicalPageLayoutInfo~PageFooter.html
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.LogicalPageLayoutInfo~PageHeader.html
Also you could use code like:
e.DefaultLogicalPageLayoutInfo.PageFooter = DateTime.Now.ToString();
The page footer also has Appearance object which you could use to format the footer based on your custom needs.
I have attached simple sample which demonstrates this approach.
If you have any additional questions feel free to ask them.
Dimitar,
Thanks for the reply. Looks like that worked.