(of course, that's all untested, may require a little work, and Brian's suggestion of combining the values directly at the SQL will work better [in this instance], and require less code)
Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _____________________________ http://blog.cutterscrossing.com Cutter (CFRelated) wrote: > Hold up, you should be able to. The query passed in to the cfgrid is > only setting the data.Store property of the ExtJS grid behind it, you > are using the cfgridcolumn tags to define your ColumnModel (another > ExtJS construct). You should be able to define a custom renederer, > pulling information from the 'record' passed to define that cell's > display. Probaby need to combine some info from the following two entries: > > http://www.coldfusionjedi.com/index.cfm/2007/8/20/Custom-grid-renderers-with-CFGRID > http://blog.cutterscrossing.com/index.cfm/2007/8/22/My-First-ExtJS-DataGrid-Pt-7-Custom-Cell-Renderers > > Steve "Cutter" Blades > Adobe Certified Professional > Advanced Macromedia ColdFusion MX 7 Developer > _____________________________ > http://blog.cutterscrossing.com > > Brian Kotek wrote: >> 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. >>> >>> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287730 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

