DocumentCustomProperties.LinkToContent(String, String) Method
Links a custom document property to the cell or cell range content.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v19.1.Core.dll
Declaration
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
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-spreadsheetcontrol-api-part-2-e4832
'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")