change datagrid column to hyperlink

  • Thread starter Thread starter Claire Reed
  • Start date Start date
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
 
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.
 
Back
Top