Cfgridkey

I would like to replace the word cfgridkey in the url by the column name that it reference.
I am using cfgrid html format.
i.e.
if I have a

<cfgridcolumn name=“id” header=“id” href=“xxx.cfm” hrefkey=“id”>
on clicking on the link I have in the url xxx.cfm?cfgridkey=1
I would like to have it xxx.cfm?id=1
Thanks

I’ve had this issue! Also I wanted to add 3 fields to the URL string. I’ve cheated. I created a field in the database query that encompasses all the info I need and takes the cfgridkey into the equation:

‘1&A=’+dbo.a+‘&b=’+dbo.b+‘&c=’+dbo.c AS URL

I’ve also discovered that unless you use the column in your grid it won’t display it, so I have:
<cfgridcolumn name=“URL” display=“no”>

Then the link is attached to another dummy field form the db:
<cfgridcolumn name=“Link” href=“http://test/page.cfm” target=“_blank” hrefkey=“URL” header=“Link” >

So when you click on it the URL reads:
http://test/page.cfm?CFGRIDKEY=1&a=1&b=2&c=3

It’s a bit of a convoluted way to do it but it works! Adding the data on to the URL doesn’t as the grid doesn’t work like a cfoutput query and loop through the data.

It has been a while since I used cfgrid but I think there is a default setting for appendKey = “yes” that adds the cfgridKey label when an HREF is specified. Try setting appendKey = “no” in your CFGRID tag.

You might also have to add ?id= to your href.