LinkCollection.Add(LinkBase) Method

Adds the specified LinkBase object to the collection.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v20.2.Core.dll

Declaration

public int Add(
    LinkBase val
)
Public Function Add(
    val As LinkBase
) As Integer

Parameters

Name Type Description
val LinkBase

A LinkBase object to add to the collection.

Returns

Type Description
Int32

An integer value indicating the position into which the new element was inserted.

Remarks

This method adds a LinkBase object to the end of the collection.

Examples

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