How to create links to a datagrid programmitcally
Could anyone suggest how to create hyper links to a datagrid? I have created a datagrid that will retrieves information from a database and would like to add hyper links to the id column programmitcally.
I know you can use create hyper links from design view, but my datagrid only appear in runtime.
How are you creating the DataGrid at runtime? You should be able to simply create a new HyperlinkColumn and add it to the DataGrid's Columns collection.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
I have replaced the BoundColumn object with the HyperlinkColumn Object.
I am using HyperLinkColumn
' -- add Hyper Link columns to datagrid
Dim datagridHyp As New HyperLinkColumn
datagridHyp.HeaderText = "ID"
datagridHyp.DataTextField = IDNo
Instead of using BoundColumn
' -- add bound columns to datagrid
Dim datagridcol As New BoundColumn
'datagridcol.HeaderText = "ID"
'datagridcol.DataField = IDNo
Last Post: 04-14-2006, 10:09 AM
By Han Lim Lee in forum .NET
Last Post: 08-26-2002, 04:38 AM
Last Post: 06-27-2002, 02:03 PM
Last Post: 10-17-2001, 03:36 AM
Last Post: 02-22-2001, 04:19 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL