CF9:
I have a cfgrid (html) that contains a number of fields including "state" and "county".
County is selectable/editable, 'state' is not.
I want to display the State column as a normal string but I want to make the County column a selectable combo/drop-down box.
I have made comboboxes inside cfgrids before.
But in this case, I only want the County column to display those that are related to the State for that record. My db can handle such a query. I'm having more trouble on the cf side of things.
As an example, the code below will display ALL possible u.s. counties w/in a dropdown in the cfgridcolumn. I need to limit it to just the values related to the state for that record (the value in cgridcolumn name='state'.) Make sense?
<cfquery name="get_Counties" datasource="xxx">
SELECT lkuCounties.CountyID, lkuCounties.CountyName
FROM lkuCounties
</cfquery>
<cfset r_CountyID = ValueList(get_Counties.CountyID)>
<cfset r_CountyName = ValueList(get_Counties.CountyName)>
(other column names and grid attributes omitted)
<cfgrid...>
<cfgridcolumn name="State"/>
<cfgridcolumn name="County" header="Event" values="#r_CountyID#" valuesdisplay="#r_CountyName#" valuesdelimiter=","/>
</cfgrid