How'd I get myself into this?

I've been having a nasty time over the last day or two with DataGrids. Everything that I want to do, that should be simple has been killing me. I think what I'm trying is simple enough. Yet, when I get down to trying it, it is much more complicated than it appears.

I know I'm being vague here, but I'm trying to spare you the details. Let's just say that I want to have a hyperlink column and each link needs to be different based on the rowID. So each link should look something like:

http://<servername>/page.aspx?ID=<rowID>

Sounds simple enough, but trying to tie each unique rowID to that link has been a challenge. I guess I'll get back to it for a bit and see if something new reveals itself.

Fun fun fun fun fun...............................

Published 15 July 2003 07:58 AM by eking1013

Comments

# Steve said on 15 July, 2003 08:52 AM
You can use a HyperLinkColumn and specify the rowID field in the DataNavigateUrlField and then in the DataNavigateUrlFormatString specify the link like so http://<servername>/page.aspx?ID={0}. A quick look at the docs for HyperLinkColumn should help you on your way...
# Eric said on 15 July, 2003 09:10 AM
Cool. Thanks guys. I appreciate the help. It's already working. Just like Steve suggested. I also found some info on the topic here: http://datawebcontrols.com/faqs/Hyperlinks/HyperlinkWithMultipleQuerystringValues.shtml

This helped out quite a bit. Thanks again fellas.
# Doug Thews said on 15 July, 2003 11:43 AM
Personally, I like using a ButtonColumn in the datagrid, and then setup a hyperlink by changing the text attribute to be the begin-anchor - URL - end-anchor construct. You can also change the alt-text to be a friendly name for the rollover.
# Doug Thews said on 15 July, 2003 12:11 PM
If you're interested, I forgot to put a link to my blog entry where I discuss using the ButtonColumn for this specific purpose:

http://www.ddconsult.com/blogs/illuminati/archives/000067.html
# Maxx50 said on 22 October, 2009 03:59 PM

For attitude change, this may be self-report or   interview. ,

Leave a Comment

(required) 
(required) 
(optional)
(required)