If you read the documentation, you'll see the answer is no. You have to pass
a query into the grid, unless you manually build up the grid elements using
cfgridrow.

You could combine the city and state into one column in the SQL. You might
also be able to generate the URL in your SQL depending on where the
querystring variables are coming from. You could also add columns to the
grid that are not displayed that hold customer id and order id, and then get
those values and pass them using a JavaScript function instead of trying to
do it with HREFKEY. Basically, given the power and flexibility of binding
the grid to a JavaScript function, I don't see much use for the old-style
HREFKEY.

On 9/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
> Hello,
>
> I am wondering if someone could clear something up for me.  I am working
> on a datagrid using CFGRID in HTML format.  I would like to be able to
> manipulate the data a little bit before throwing it into the grid.  Two
> examples are that I want CITY AND STATE to be in one column, and I want to
> be able to have one of the columns link to a URL that has two dynamic
> variables in it, rather than just one like you could do with using HREFKEY.
> (The linked URL would be something like:
> http://www.mydomain.com/results.cfm?customer_id=#x#&order_id=#y#).
>
> So the question I have is what is the best way to handle these two
> things?  I started out working with just a CFQUERY on the same template page
> as the CFGRID, but now I've realized that I would probably want to do a CFC
> instead.  The question is, what format do I send back the data with?  So far
> the only thing I could come up with that works, but is slow, is to do the
> initial query, then CFLOOP through the data.  While looping, format the data
> and put it into a new query using QuerySetCell/QueryAddRow.  It seems clunky
> and again, it is slow.  Is their any other way, like could I just return a
> structure or something like that?
>
> Any help is appreciated.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287712
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to