DevExpress Grid Control Print Preview
How to create a print prieview of Grid Control data in DeveExpress
DevExpress Grid control is the easiest way to create table like report. How do I get my print preview ?
GridView class have ShowPrintPreview method which will generate print preview of data. If you are using Grid Control have to Cast the object to GridView first.
((GridView) gridControl1.MainView).ShowPrintPreview();
Header and Footer
Report Header, Page Header and Footers can be accessed as follows.
((GridView) gridControl1.MainView).OptionsPrint.RtfReportHeader="COMPANY";
((GridView)gridControl1.MainView).OptionsPrint.RtfPageHeader = "PAGE 1";
((GridView)gridControl1.MainView).OptionsPrint.RtfPageFooter = "CREATED WITH DEV EXPRESS";
The Print Preview also let you export print into other formats like PDF,HTML etc