DataViewBase.ShowRibbonPrintPreviewDialog(Window) Method
Creates the print document from the DataViewBase and displays the document’s Print Preview as a modal window with the Ribbon UI.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v20.1.Core.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
owner | Window | The owner of the Print Preview. |
Remarks
The Print Preview displays the printed document’s appearance. The Print Preview window allows end users to print the document and export it to a file in the required format.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-print-and-export-the-grid-e1669.
void Print_Data(object sender, RoutedEventArgs e) {
view.ShowRibbonPrintPreviewDialog(this);
}
Note
You can preview, print, and export the GridControl‘s data only if the DXPrinting Library is available.
Refer to the Printing and Exporting section for more information on how to print and export the GridControl‘s data.