0

I am working with ColdFusion Version 8. I have a CFGrid displaying some data:

<cfgrid name="GVDisplayUsers" format="html" height="500" autowidth="true" width="950" font="Tahoma" fontsize="12" sort=yes bind="cfc:CFFunctions.getUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">

<cfgridcolumn name="ID"  header="ID">
<cfgridcolumn name="USERID" header="USERID">
<cfgridcolumn name="FIRST_NAME" header="First Name">
<cfgridcolumn name="LAST_NAME" header="Last Name">

</cfgrid>

What I wanted to do is have the ID column be a link to the USER information page.

How do I go about doing this?

Thanks,

Peter Boughton
  • 110,170
  • 32
  • 120
  • 176
user1186309
  • 15
  • 1
  • 7

1 Answers1

4

<cfgridcolumn> has href and hrefkey attributes

<cfgrid name="GVDisplayUsers" format="html" height="500" autowidth="true" width="950" font="Tahoma" fontsize="12" sort=yes bind="cfc:CFFunctions.getUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">

 <cfgridcolumn name="ID"  header="ID" href="userpage.cfm" hrefkey="USERID">
 <cfgridcolumn name="USERID" header="USERID">
 <cfgridcolumn name="FIRST_NAME" header="First Name">
 <cfgridcolumn name="LAST_NAME" header="Last Name">

</cfgrid>
Matt Busche
  • 14,216
  • 5
  • 36
  • 61
  • Thank you so much! Google has never been my friend when searching things :( lol. – user1186309 Dec 14 '12 at 15:56
  • No need for google. It is the right there [in the documentation](http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_g-h_04.html#3988181) ;) – Leigh Dec 14 '12 at 16:09