Skip to main content
Inspiring
Jan 10, 2013 9:58 PM UTC
Question

dynamic href property in cfgrid?

is there a way to make this work? i'm trying to use different href values inside a cfgrid, based on the value returned by the query. for some reason, it always navigates to the second url, "someOtherURL". grid format is html

<cfgrid>

...

<cfif myQry.myColumn eq 'something'>

    <cfgridcolumn href="someURL">

<cfelse>

    <cfgridcolumn href="someOtherURL">

</cfif>

...

</cfgrid>

thanks a lot!

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
Jan 11, 2013 3:18 AM UTC

Take your if/else logic outside of the cfgrid tag so you can see what you are doing.  I solve these sorts of problems like this:

<cfif WhatIHave is WhatIExpect>

output yes

<cfelse>

output no and WhatIExpect and WhatIHave.

If WhatIExpect looks like WhatIHave, check for whitespace.

Translate
ionAuthor
Inspiring
Jan 11, 2013 5:56 PM UTC

thanks Dan, outside the grid works fine. the string returned is short and never contains white spaces. any other ideas?

Translate