CFMX7 cfgrid
I have a search page created in CFMX7-Flash and uses a cfgrid to display the information. I want to create code so that when the user selects the part number they want, it will bring up another page with more part detail. Is this possible?
Here is my code so far.
<cfif not IsDefined("form.part_number")>
<cfset form.part_number = "*">
</cfif>
<cfif not IsDefined("form.procurement_document")>
<cfset form.procurement_document = "*">
</cfif>
<cfif not IsDefined("form.description")>
<cfset form.description = "*">
</cfif>
<cfif not IsDefined("form.material_description")>
<cfset form.material_description = "*">
</cfif>
<cfif not IsDefined("form.selection_code")>
<cfset form.selection_code = "*">
</cfif>
<cfquery name="Materials" datasource="PROD1">
SELECT PART_NUMBER, PROCUREMENT_DOCUMENT, DESCRIPTION, MATERIAL_DESCRIPTION, SELECTION_CODE, REMARKS, COMMENTS
FROM LPDB.MHC
where
PART_NUMBER like '#UCase ('#Replace(form.PART_NUMBER, "*", "%")#')#'
and
description like '#UCase ('#Replace(form.description, "*", "%")#')#'
and
material_description like '#UCase ('#Replace(form.material_description, "*", "%")#')#'
ORDER BY PART_NUMBER ASC
</cfquery>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>MHC DATABASE SEARCH</title>
</head>
<body>
<cfform name="Search" height="1200" width="1000" format="Flash" skin="HaloOrange" preservedata="yes">
<cfformgroup type="tabnavigator"
style="marginTop:0;
backgroundColor:##FFFFEE;
fontSize:10;
marginBottom:5;
fontStyle:normal;
backgroundColor:##FFFFEE">
<cfformgroup type="page" label="MHC Search">
<cfformgroup type="hdividedbox" >
<cfformgroup type="VBox" style="fontSize:12; fontStyle:normal; height:auto">
<cfformgroup type="vertical" height="80">
<cfformgroup type="VBox" style="fontSize:12; fontStyle:normal; height:auto">
<cfformgroup type="vertical" height="80">
<cfinput type="text" name="part_number" width="100" label="Part Number"
onKeyDown="if(Key.isDown(Key.ENTER)) {submitForm()}">
<cfinput type="text" name="description" label="Description" width="300"
onKeyDown="if(Key.isDown(Key.ENTER)) {submitForm()}">
<cfinput type="text" name="Material_Description" label="Mat'l Description" width="300"
onKeyDown="if(Key.isDown(Key.ENTER)) {submitForm()}">
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfformgroup>
<cfformgroup type="VBox" height="150">
<cfformgroup type="tile" height="80" width="100" label="Tile box">
<cfinput type = "submit" name="submit" width="100" value = "Search">
<cfinput type = "button" name="reset" width="100" value = "Reset Fields"
onclick="part_number.text='*'; description.text='*'; Material_Description.text='*'">
</cfformgroup>
</cfformgroup>
</cfformgroup>
<cfformitem type="hrule" style="color:##999900; shadowColor:##DDDD66; strokeWidth:4"/>
<cfformgroup type="vbox" style="fontSize:12; fontStyle:normal;
verticalGap:5; marginLeft:1; marginRight:1">
<cfgrid name="gridMaterial" format="flash" query="Materials"
selectmode="row" width="950" height="300" fontsize="11" font="Tahoma" colheaderbold="yes">
<cfgridcolumn name="Part_Number"
width="100"
header="Part Number">
<cfgridcolumn name="procurement_document"
header="Proc. Doc"
width="100">
<cfgridcolumn name="Description"
width="150"
header="Description">
<cfgridcolumn name="material_description"
width="160"
header="Mat'l Description">
<cfgridcolumn name="selection_code" dataalign="center"
header="Selection Code"
width="120">
<cfgridcolumn name="remarks"
width="120"
header="Remarks">
<cfgridcolumn name="comments"
width="120"
header="Comments">
</cfgrid>
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
</body>
</html>
|