Back to Devexpress

DataViewBase.PrintDirect(String) Method

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-dot-printdirect-x28-system-dot-string-x29.md

latest2.1 KB
Original Source

DataViewBase.PrintDirect(String) Method

Uses the specified printer to print the control’s data.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public void PrintDirect(
    string printerName
)
vb
Public Sub PrintDirect(
    printerName As String
)

Parameters

NameTypeDescription
printerNameString

A printer’s name.

|

Remarks

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

csharp
void Print_Data(object sender, RoutedEventArgs e) {
    view.PrintDirect(printerName:"Printer1");
}
vb
Private Sub Print_Data(ByVal sender As Object, ByVal e As RoutedEventArgs)
    view.PrintDirect(printerName:="Printer1")
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