how to dynamically create a hyperlink in a gridview cell

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

Hi all,

how would I be able to format programmatically
say the first cell on the 11th row of a gridview as a hyperlink ?

Thanks,

Carlos
 
Alvin,

thank you for your answer. How would I create the hyperlink template at
run time for that specific cell? Can you show some code?

Thanks,

Carlos.

Alvin Bruney said:
You would need to hook an appropriate event, like itemdatabound or similar
and extract the cell from it using e.item[10] (or similar syntax). Then,
do a find control on the cell to find the hyperlink. If you don't have an
hyperlink, you will need to create an hyperlink object and then add it to
the cell - usually at the first position. If you google you should find
plenty of code to do this, it is rather common.

Otherwise, you can use a template column if your grid has templatized
columns. You can format from the designer or at run-time.

--
Regards,
Alvin Bruney

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

Carlos said:
Hi all,

how would I be able to format programmatically
say the first cell on the 11th row of a gridview as a hyperlink ?

Thanks,

Carlos
 
Back
Top