LinkColumn

Represents a column of cells that contain links in a DataGridView control.

The DataGridViewLinkColumn class is a specialized type of the DataGridViewColumn class used to logically host cells that respond to user clicks. The DataGridViewLinkColumn class is similar to the DataGridViewButtonColumn class but provides a different user experience that may be more appropriate in certain situations, such as displaying a URL stored in a database table.

To display the same link text for every cell, set the UseColumnTextForLinkValue property to true and set the Text property to the desired link text.

A DataGridViewLinkColumn has an associated DataGridViewLinkCell in every DataGridViewRow that intersects it.

The default sort mode for this column type is NotSortable.

To respond to user link clicks, handle the DataGridView.CellMouseClick event. You can also use the DataGridView.CellClick event to respond to clicks anywhere in the cell.

For a full list of properties, methods and events see the API documentation.

Last updated