HowTo: databound hyperlink in DataGrid?

A

Alex

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.
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

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!
***************************************************************
 
A

Alex

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top