views:

696

answers:

2

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

A: 

http://www.codeproject.com/KB/cpp/Datagrid_ColumnStyles.aspx

Robert Harvey
Thanks, but that page shows how to have text columns and hyperlink columns. What I need is one type of column that will mix text and hyperlinks (in the same column).
LD2008
+2  A: 

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.

Robert Harvey