DataGridViewLinkColumn.Text 属性

定义

获取或设置当 UseColumnTextForLinkValuetrue 时,列的单元格中显示的链接文本。Gets or sets the link text displayed in a column's cells if UseColumnTextForLinkValue is true.

public:
 property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
public string Text { get; set; }
member this.Text : string with get, set
Public Property Text As String

属性值

一个包含链接文本的 StringA String containing the link text.

异常

设置此属性时,CellTemplate 属性的值是 nullWhen setting this property, the value of the CellTemplate property is null.

注解

如果UseColumnTextForLinkValue将属性设置为true, 则文本可见。The text is visible if the UseColumnTextForLinkValue property is set to true. 否则, 将用每个单元格的FormattedValue属性填充每个单元格的链接文本。Otherwise, each cell's link text is populated with the FormattedValue property of each cell.

您可以通过在Text将 "列UseColumnTextForLinkValue属性" 设置为true"" UseColumnTextForLinkValue后将false单元属性设置为, 来覆盖单个单元格的属性值。You can override the Text property value for individual cells by setting the cell UseColumnTextForLinkValue property to false after setting the column UseColumnTextForLinkValue property to true.

适用于

另请参阅