if the #productid# var you are trying to pass as url var is the same as 
returned in the productid query column - do not pass your own url var then.
use the hrefkey attribute of cfgridcolumn instead (you have it in there 
already as i see). but keep in mind that it adds a HREFKEY url var, not 
productid, so your destination page has to look for url.hrefkey, not 
url.productid...

alternatively, you could amend your query resultset in your cfc to add 
html code to the linked column, including any url vars you want to pass 
- html cfgrid can render html in the column data just fine...

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com



Michael Grove wrote:
> I am trying to us a CFgrid, Format HTML using a CFC and Bind. The grid 
> renders fine, but I want to include a few columns that either display a small 
> image or a static X. Each of these columns should point to a specific url and 
> pass the parameter.
>
> First off I cannot figure out for the life of me how to pull in a simple 
> variable to pass in the href portion fo teh tag.
>
> <cfform name="test">
> <cfgrid name="data" bindonload="true" appendkey="yes" selectmode="single" 
> striperows="yes" format="html" 
> bind="cfc:cfc.AdminProducts.getProducts({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
>  pagesize="30" autowidth="no" width="800">
> <cfgridcolumn name="productid" display="no" />
> <cfgridcolumn name="title" header="Title" width="315"  
> href="../Product_Details.cfm" hrefkey="productid" />
> <cfgridcolumn name="typename" header="Type" width="90" />
> <cfgridcolumn name="Price_Our" header="Price" width="60" />
> <cfgridcolumn name="start1" header="Start Date" width="90" />
> <cfgridcolumn name="x" header="Copy" values="x" valuesdisplay="x" 
> href="../Product_Details.cfm?productid=#productid#"  hrefkey="productid" 
> width="60" />
> </cfgrid>
> </cfform>
>
> Everytime I run this I get Variable PRODUCTID is undefined.
>
> I have tried placeing everything I can think of in front of the productid 
> viarable but it alwasy tells me that it is undefined.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295566
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