Skip to main content
Inspiring
April 17, 2006
Question

link cfgrid

  • April 17, 2006
  • 3 replies
  • 579 views

Hello,
I'm using cfgrid for my application. I had a question, is there a way to link cfcolumn to certain page?

The link would be:
<a href="detail.cfm">details</a>


Thanks in advance!!
This topic has been closed for replies.

3 replies

Participating Frequently
April 17, 2006
Yes, but as this livedoc states, it will only work with cfgrid format="applet".
If you run the following example, notice how the value of the "Course_ID" cell is appended to the URL string automatically:

<cfquery name = "GetCourses" dataSource = "cfdocexamples">
SELECT Course_ID, Dept_ID, CorNumber,
CorName, CorLevel
FROM CourseList
ORDER by Dept_ID ASC, CorNumber ASC
</cfquery>

<cfform>


<cfgrid name = "FirstGrid" format="applet"
height="320" width="580"
font="Tahoma" fontsize="12"
query = "GetCourses">
<cfgridcolumn name="Course_ID" href=" http://www.macromedia.com/cfusion/webforums/forum/index.cfm?forumid=1" header="Course ID">
<cfgridcolumn name="Dept_ID" header="Dept ID">
<cfgridcolumn name="CorNumber" header="Course Number">
<cfgridcolumn name="CorName" header="Course Name">
<cfgridcolumn name="CorLevel" header="Course Level">
</cfgrid>
</cfform>
splitzerAuthor
Inspiring
April 17, 2006
so this means it will not work with flash forms? Oh man, i just converted my application for nothing.
splitzerAuthor
Inspiring
April 17, 2006
Yes, i tried that but nothing happens when i click on the column.
I've this in my script:

<CFGRIDCOLUMN
NAME="subject"
HEADER="Subject" headeralign="left" dataalign="left"

WIDTH="100" bold="no" italic="no"
display="yes" headerbold="no" headeritalic="no"
values="#qGetMessages.subject#"

href="detail.cfm?msgnumber=#qGetMessages.messagenumber#"
hrefKey = "subject"
>
Participating Frequently
April 17, 2006
you mean the:

href = "URL"
hrefKey = "column_name"
target = "URL_target"
appendKey = "yes" or "no"
highlightHref = "yes" or "no"

parameters found on the http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000266.htm page?