LeoD
LeoD

Reputation: 2072

Hyperlink in DataGridView - how to have text and links?

Is it possible to have a Windows Forms DataGridView in which one of the columns will display standard text with some words of it as clickable links? Here's what I'd like to do: whenever I get a certain regex pattern in the text, I want to make that match a hyperlink.

Any idea on how to implement this?

Thanks

Upvotes: 1

Views: 1984

Answers (1)

Robert Harvey
Robert Harvey

Reputation: 180908

Well, to do what you want to do I think you would need a custom control that derives from the IDataGridViewEditingControl interface, which you could then plug into your DataGridView. This article shows how to do this with a RichTextBox.

Unfortunately I don't think a drop-in solution exists, unless you're willing to go commercial. Infragistics has a WinGrid control with which they claim you can plug in a WinFormattedTextEditor that supports hyperlinks.

Upvotes: 3

Related Questions