DataGridViewLinkColumn::Text Property

 

Gets or sets the link text displayed in a column's cells if UseColumnTextForLinkValue is true.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
property String^ Text {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

A String containing the link text.

Exception Condition
InvalidOperationException

When setting this property, the value of the CellTemplate property is null.

The text is visible if the UseColumnTextForLinkValue property is set to true. Otherwise, each cell's link text is populated with the FormattedValue property of each cell.

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.

.NET Framework
Available since 2.0
Return to top
Show: