473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

HowTo: databound hyperlink in DataGrid?

I would like to have one column in my DataGrid that content acts as a
hyperlink.
In addition to that I would like that the content is databound to a DataSet
source.

If I create a hyperlink column in VS.NET I loose the databinding feature for
that column. If I choose a data bound column I don't get the hyperlink
formatting and actions.

Nov 18 '05 #1
2 2533
Right click on the datagrid and go to Property Builder. Go to the second
choice, which is bound columns (or similar). Uncheck autogenerate checkbox
and add each of the columns. Unfortunately, you will have to know the actual
names of the fields. You can set up a hyperlink column by pulling a
hyperlink column over. You can set different fields for text and URL. For
URL format, it is generally:

pageName.aspx?ID={0}

You then specify the column to use for ID= in the URL text field. Once you
play with it a bit, you will find it to be extremely simple.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** *************
Think outside the box!
************************************************** *************
"Alex" <so*****@nospam.com> wrote in message
news:c5**********@news.mch.sbs.de...
I would like to have one column in my DataGrid that content acts as a
hyperlink.
In addition to that I would like that the content is databound to a DataSet source.

If I create a hyperlink column in VS.NET I loose the databinding feature for that column. If I choose a data bound column I don't get the hyperlink
formatting and actions.

Nov 18 '05 #2
Being new to this, I think I need a little more detail for the second part.
My URL's come from a DB as a column in the dataset.
"Cowboy (Gregory A. Beamer) [MVP]" <No************@comcast.netNoSpamM> wrote
in message news:O%******************@TK2MSFTNGP09.phx.gbl...
Right click on the datagrid and go to Property Builder. Go to the second
choice, which is bound columns (or similar). Uncheck autogenerate checkbox
and add each of the columns. Unfortunately, you will have to know the actual names of the fields. You can set up a hyperlink column by pulling a
hyperlink column over. You can set different fields for text and URL. For
URL format, it is generally:

pageName.aspx?ID={0}

You then specify the column to use for ID= in the URL text field. Once you
play with it a bit, you will find it to be extremely simple.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** *************
Think outside the box!
************************************************** *************
"Alex" <so*****@nospam.com> wrote in message
news:c5**********@news.mch.sbs.de...
I would like to have one column in my DataGrid that content acts as a
hyperlink.
In addition to that I would like that the content is databound to a

DataSet
source.

If I create a hyperlink column in VS.NET I loose the databinding feature

for
that column. If I choose a data bound column I don't get the hyperlink
formatting and actions.


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alex | last post by:
I would like to have one column in my DataGrid that content acts as a hyperlink. In addition to that I would like that the content is databound to a DataSet source. If I create a hyperlink...
2
by: Alex | last post by:
I'm using a DataGrid with several bound columns. However for one column I had to use a ItemTemplate with a asp:hyperlink in it. How can I switch the hyperlink column into the edit mode in the...
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
2
by: BobRoyAce | last post by:
I am brand new to ASP.NET and am now required to take over maintenance of a ..NET/C# web application. On one of the pages I'm working on there is a DataGrid which has multiple columns. One of the...
0
by: Benton | last post by:
Hi there, I am using ASP.NET 2.0 and need multiple parameters in Hyperlink column so I add this to my DataGridView: <asp:TemplateField> <ItemTemplate><asp:Hyperlink text="Edit" id="hylEdit"...
3
by: Raja | last post by:
I have a datagrid, it has dropdown box as a column and i have one more column that has hyperlink. The NavigateURL for the hyperlink is to open a new window with a query stirng parameter as the...
3
by: Tim::.. | last post by:
I currently have the following datagrid but want to turn the name and email column into a hyperlink in the codebehind! Can someone please tell me how I achieve this! Thanks Private Sub...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
1
by: Carlos | last post by:
Hi all, I need a field that it is both databound, and hyperlink in a gridview. That is, the value is obtained from a query, and at the same time needs to point to a new page where will be used...
1
by: Håkan | last post by:
Hi! How do you format the href field of the <a>-tag when you use a databound BulletedList in Hyperlink mode? The field in the database contains an ID that I want to use as a parameter in the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.