By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

Difficulty in adding hyperlink control to datagrid

P: 2
i'm trying to display some values in Gridview. but i don't know how many columns i need to display. at run time only i will come to know how many columns i need to display. it depends up on the values from Database. so i'm creating columns dynamically and adding to gridview. till that it works fine. but i want some columns value to be hyperlink. so i need to create some columns hyperlink dynamically.

here i saw hyperlink creation code below:

Expand|Select|Wrap|Line Numbers
  1. Dim myLink As New HyperLink
  2. myLink.Text = columnText
  3. myLink.NavigateUrl = "Update.aspx?id=" & columnID
  4. container.Controls.Add(myLink)
but here problem is i cant access hyperlink field though i used

imports system.web
Aug 14 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.