Skip to main content
Row

DocumentCustomProperties.LinkToContent(String, String) Method

Links a custom document property to the cell or cell range content.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

void LinkToContent(
    string name,
    string linkTarget
)

Parameters

Name Type Description
name String

A string value that is the name of the custom document property.

linkTarget String

A string value that is the defined name of the cell or cell range to be linked to the custom property.

Remarks

This method is available only to custom document properties (accessible using the DocumentProperties.Custom property).

If the custom property with the name passed as the name method parameter doesn’t exist, it is created automatically.

The custom property linked to the named cell range returns the value of the range’s upper-left cell.

Example

View Example

//Define a name to the cell to be linked to the custom property
workbook.DefinedNames.Add("checked_by", "E6");

//Connect the custom property with the named cell
workbook.DocumentProperties.Custom.LinkToContent("Checked by", "checked_by");

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LinkToContent(String, String) 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