Skip to main content

DataGridLinkBase.DataGrid Property

Gets or sets a DataGrid object to be printed via the current link.

Namespace: DevExpress.XtraPrintingLinks

Assembly: DevExpress.XtraPrinting.v23.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.Printing

Declaration

[DefaultValue(null)]
public DataGrid DataGrid { get; set; }

Property Value

Type Default Description
DataGrid null

A DataGrid object to be printed.

Example

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

PrintingLinks-Grid

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

private void simpleButton1_Click(object sender, EventArgs e) {
    DataGridLink dgLink = new DataGridLink();
    dgLink.DataGrid = dataGrid1;
    printingSystem1.Links.Add(dgLink);
    dgLink.ShowPreviewDialog();
}
See Also