Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfgrid 1

Status
Not open for further replies.

danarashad

Programmer
Nov 2, 2006
115
0
0
US
I need help of course. How do you add links to go to a page using cfgrid.
<cfform name="frmTest" Method="POST" Action="" format="flash" skin="halosilver">
<cfformgroup type="Panel" label="Letters">
<cfformgroup type="tabnavigator">
<cfformgroup type="page" label="Letter One">
<cfformitem type="text"
<cfgrid name= "data" query="memberList">
<cfgridcolumn name="fname" header="First Name">
<cfgridcolumn name="lname" header="Last Name">
<cfgridcolumn name="cycle" header="Cycle">
</cfgrid>
<cfinput name="submit" value="Print" type="submit">
</cfformitem>
How do you add a link to the fname. dont know how to get the href="" to work.
 
I added this to the cfgridcolumn, and nothing happens.
<cfgridcolumn name="id" header="ID" href="print.cfm">
I don't even get that little underline that lets you know the words are a link?
 
I need to do something similar but only display a cfgrid on a tab that is dynamic. That is to say that the contents of the cfgrid change based on the tab selected. Any ideas here.

Thanks
 
I haven't used cfgrid so I can't speak from experience. However, do a quick google search and you can find plenty of examples on how to achieve both cases.

____________________________________
Just Imagine.
 
Well I have been looking and have not been able to find exactly what I need. Any specific location?

Thanks very much

Jim
 
What is it you are trying to achieve?
A page displaying certain info on the selected field?

I would...
<cfform name="frmTest" Method="POST" Action="" format="flash" skin="halosilver">
<cfformgroup type="Panel" label="Letters">
<cfformgroup type="tabnavigator">
<cfformgroup type="page" label="Letter One">
<cfformitem type="text"
<cfgrid name= "data"
query="memberList"
onChange="print.cfm?fname='+data.selectedItem.fName+'">
<cfgridcolumn name="fname" header="First Name">
<cfgridcolumn name="lname" header="Last Name">
<cfgridcolumn name="cycle" header="Cycle">
</cfgrid>
<cfinput name="submit" value="Print" type="submit">
</cfformitem>

Then, in the print.cfm
<cfset fname="URL.fname">

Then run your query to return your results based on 'fName' or print out the value of 'fName' etc.

This should solve your problem if your problem is what i think it is
 
Sorry that should read...

onChange="getURL(print.cfm?fname='+data.selectedItem.fName)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top