Back to Devexpress

DataViewBase.PrintDirect() Method

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-725894b5.md

latest1.9 KB
Original Source

DataViewBase.PrintDirect() Method

Uses the default printer to print the control.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public void PrintDirect()
vb
Public Sub PrintDirect

Remarks

Use the PrintDirect method without parameters to send the control’s data to the default printer. To send the control’s data to a specific printer, use the PrintDirect method with the printerName parameter. To invoke the standard Print dialog, use the DataViewBase.Print method.

csharp
void Print_Data(object sender, RoutedEventArgs e) {
    view.PrintDirect();
}
vb
Private Sub Print_Data(ByVal sender As Object, ByVal e As RoutedEventArgs)
    view.PrintDirect()
End Sub

Note

You can preview, print, and export the control’s data only if the DXPrinting Library is available.

Refer to the following topics for more information on how to print data:

See Also

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace