.NET Discussion

.NET Issues, Problems, Code Samples, and Fixes

ASP.NET GridView: How To Add A HyperLinkColumn Dynamically

I have been searching all over the web for a way to do this, and it doesn’t appear as if anyone else knows! How do you add a HyperLinkColumn to a GridView dynamically at runtime? If this isn’t possible, is there a way to modify its properties? I can’t seem to access the HyperLinkColumn to modify the Target property, which doesn’t seem right.  Shouldn’t you be able to access any property programmatically?

Status: Solved! (10/23/07)
Solution: See comment by Kevin Brock. Thanks, Kevin!

September 24, 2007 Posted by | ASP.NET, GridView | | 13 Comments