- 2 minutes to read
The GridControl provides a fast and flexible way to print the View's content. This topic consists of the following sections:
A View provides multiple methods to print its contents.
|DataViewBase.Print||Invokes the standard Print dialog that allows an end-user to print the grid.|
|DataViewBase.PrintDirect||Prints the grid using the default printer.|
|DataViewBase.ShowPrintPreview||Creates the print document from the DataViewBase and displays the document's Print Preview.|
|DataViewBase.ShowPrintPreviewDialog||Creates the print document from the DataViewBase and displays the document's modal Print Preview.|
|DataViewBase.ShowRibbonPrintPreview||Creates the print document from the DataViewBase and displays the document's Print Preview with the Ribbon.|
|DataViewBase.ShowRibbonPrintPreviewDialog||Creates the print document from the DataViewBase and displays the document's modal Print Preview with the Ribbon.|
The Print Preview window allows you to customize the printed document, print or export it to a file in the required format. The image below illustrates the Print Preview window for a sample grid.
Each View provides a set of options that specify the View elements to be printed. You can access these options as follows.
At design time, using the Feature Browser dialog.
At design time, with the View's properties in the Properties window.
- In code, using View's properties (e.g., DataViewBase.PrintTotalSummary, GridViewBase.PrintAllGroups, etc.). See the Printing Options topic, which describes printing options for all types of Views, to learn more.
Printing Styles and Templates
Each View provides a set of styles and templates that define the appearance of the GridControl's visual elements when the grid is printed.
The Printing Styles section of the Grid Control Styles topic describes style properties.
The Print Templates section of the Grid Elements That Support Templates topic describes template properties.
Refer to the following example to learn how to render images within data cells: Customizing the Appearance of Data Cells when Printing or Exporting the Grid.