Link.PrintDlg() Method

Displays the standard Print dialog and prints the current document.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.XtraPrinting.v20.2.dll

Declaration

public void PrintDlg()
Public Sub PrintDlg

Remarks

This method displays the standard Print dialog that allows an end-user to print the document, as well as (if required) select the printer, specify the range of pages to print, the number of copies, etc.

Examples

The following code demonstrates how to create a PrintableComponentLink, add it to the PrintingSystem.Links collection, adjust its printing settings, and use it to print an existing GridControl.

using DevExpress.XtraPrinting;
using DevExpress.XtraGrid.Views.Grid;
// ...

// Create printing components.
PrintingSystem printingSystem1 = new PrintingSystem();
PrintableComponentLink printableComponentLink1 = new PrintableComponentLink();
// ...

private void Form1_Load(object sender, EventArgs e) {
    // Add the link to the printing system's collection of links.
    printingSystem1.Links.AddRange(new object[] { printableComponentLink1 });

    // Assign a control to be printed by this link.
    printableComponentLink1.Component = gridControl1;

    // Assign the printing system to the document viewer.
    documentViewer1.PrintingSystem = printingSystem1;
}

Implements

DevExpress.XtraPrinting.Links.IWinLink.PrintDlg()
See Also