[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 825
  • Last Modified:

CFGRID COLUMNS SELECT BOX?

CAN SOMEONE please help me display the output of the query as a dropdown box in the below cfgeid? thanks

<cfquery datasource="#dsn#" name="getSalesPpl">
    select SalesPersonID, SalesPersonShortName
    from tblSalesPeople
    where inactive = '0'
</cfquery>

<cfform method="get" name="myform" preloader="no" format="html"  height="135">
   <cfgrid name="contactList"
      height="100"
      width="650"
      vspace="10"
      selectmode="edit"
      insert="Yes"
      delete="Yes"
        align="center"
      format="applet">
      <cfgridcolumn name="name" header="Salesperson" values="#getSalesPpl.SalesPersonShortName#">
0
judsonmusic
Asked:
judsonmusic
1 Solution
 
Scott BennettManager TechnologyCommented:
You need to use the valuelist function to create a comma separated list of the values and displays to be used in your drop down. like this:
<cfgridcolumn  name="name" header="Salesperson" values="#valuelist(getSalesPpl.SalesPersonID)#" valuesdisplay="#valuelist(getSalesPpl.SalesPersonShortName)#">

Open in new window

0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now