-
How to create links to a datagrid programmitcally
Hi People,
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.
Please help
Thanks
Kero
-
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.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Thanks Phil,
I have replaced the BoundColumn object with the HyperlinkColumn Object.
eg.
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
Thanks
kero
-
Similar Threads
-
Replies: 4
Last Post: 04-14-2006, 09:09 AM
-
By Han Lim Lee in forum .NET
Replies: 0
Last Post: 08-26-2002, 03:38 AM
-
Replies: 7
Last Post: 06-27-2002, 01:03 PM
-
Replies: 0
Last Post: 10-17-2001, 02:36 AM
-
Replies: 0
Last Post: 02-22-2001, 03:19 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks