[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus, Navigation, Selection
   [Expand]Drag-and-Drop
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Collapse]Printing and Exporting
     Printing
     Printing Options
     Exporting
     Customizing the Appearance of Data Cells when Printing or Exporting the Grid
     Grid-Based Report Generation
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Printing

The GridControl provides a fast and flexible way to print the View's content. This topic consists of the following sections:

Expanded Overview

A View provides multiple methods to print its contents.

Member Description
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.

Expanded Printing Options

Each View provides a set of options that specify the View elements to be printed. You can access these options as follows.

  1. At design time, using the Feature Browser dialog.

  2. At design time, with the View's properties in the Properties window.

  3. 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.

Expanded 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.

Expanded See Also

Is this topic helpful?​​​​​​​