Skip to main content

LinkCollection.Add(LinkBase) Method

Adds the specified LinkBase object to the collection.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v22.1.Core.dll

Declaration

public int Add(
    LinkBase val
)

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.

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();
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the Add(LinkBase) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also