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();
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.