I want to print my GridControl as table. There are 2 methods:
- Print (immediately prints grid by default printer)
- ShowPrintPreview (shows preview dialog like XtraReport). When I press Print button in this preview, print dialog appears (choose printer, print quality, copies number etc).
Is there a way to call this print dialog for GridControl without showing preview dialog?
All I want is call gridControl.Print(), choose printer and press Print.
To solve this problem you need to add a reference for the DevExpress.XtraPrinting assembly, and call the following code:
PrintingSystem ps = new PrintingSystem(); PrintableComponentLink link = new PrintableComponentLink(ps); link.Component = gridControl; link.CreateDocument(); link.PrintDlg();