Skip to main content
A newer version of this page is available. .

DataViewBase.PrintDirect(String) Method

Uses the specified printer to print the GridControl‘s data.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.1.Core.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core

Declaration

public void PrintDirect(
    string printerName
)

Parameters

Name Type Description
printerName String

A printer’s name.

Remarks

Use the PrintDirect method with the printerName parameter to send the GridControl‘s data to the specified printer. To invoke the standard Print dialog, use the DataViewBase.Print method.

void Print_Data(object sender, RoutedEventArgs e) {
    view.PrintDirect(printerName:"Printer1");
}

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.

See Also