change datagrid column to hyperlink

C

Claire Reed

Hi All,

I have a datagrid and am autogenerating columns. I would like one of
the columns to be a hyperlink column after the data has been bound
i.e. I already have a column with the data in it (a name) and I want
it to be converted to a hyperlink. Is it possible to do this at
runtime?

thanks

Claire
 
M

Marina

I don't think you can do this with columns generated at runtime.

What you can do, is have sql like: select '<a href="' + MyUrlColumn + '">'
+ MyUrlColumn + '</a>' as 'The Link' from MyTable

This basically builds an <a> link in the SQL itself, and since the datagrid
treats and text as HTML, this will display a link.
 

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

No members online now.

Forum statistics

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

Latest Threads

Top