Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ListViewLink Class

A link to print the ListView control.

Namespace: DevExpress.XtraPrintingLinks

Assembly: DevExpress.XtraPrinting.v24.2.dll

NuGet Package: DevExpress.Win.Printing

#Declaration

#Remarks

Use the ListViewLink class to print the ListView control.

To do this, assign an existing ListView object to the ListViewLinkBase.ListView property, and then either call the ListViewLink.ShowPreview (ListViewLink.ShowPreviewDialog) method to preview a document, or the ListViewLink.Print (ListViewLink.PrintDlg) method to send it to a printer.

#Example

This example demonstrates how to create and display a Print Preview for the ListView control, via the ListViewLink.

PrintingLinks-ListView

using System;
using System.Windows.Forms;
using DevExpress.XtraPrintingLinks;
// ...

private void simpleButton1_Click(object sender, EventArgs e) {
    ListViewLink lwLink = new ListViewLink();
    lwLink.ListView = listView1;
    printingSystem1.Links.Add(lwLink);
    lwLink.ShowPreviewDialog();
}
See Also