Problem with datagridview datagridviewlinkcolumn

rdlsz241

New member
Joined
Mar 20, 2006
Messages
3
Programming Experience
3-5
Hi I'm working with VB.Net 2005 and am having a problem with my datagridview. I have added a DataGridViewLinkColumn and that works fine, except that I don't want a link to show up for every row in my grid.

Here's the scenario: Person A has a value in a hidden column in my grid, so I want to show his name as a hyperlink to a webpage. Person B has a null value in the hidden column, so I just want to show his name without a link.

I have messed with trying to remove the link after creating the DataGridViewLinkColumn (which creates a link for every row), and have also tried just creating a link for each row that needs one. I have not been successful with either method.

I could do this no problem if this was ASP.net (in the databind event of the grid using href), but I haven't used DataGridViews a ton in WinForms, and am having quite a bit of trouble.

Thanks in
 
Back
Top