how to dynamically create a hyperlink in a gridview cell

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
 
C

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
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top