0 Replies Latest reply on Dec 10, 2008 9:12 AM by erikTsomik

    Cfgrid prepopulate cfselect

      I have trouble prepolualting cfselect in the flash form. When i click on the cfgrid I want specific drop down to be prepopulated (i have 18 of them) based on the type.
      Here is my cfgrid
      <cfgrid name="myGrid" query="tempQuery" height="445" width="200" rowheaders="false" onchange="#getComboBoxValue#">
      <cfif menuQuery.menuID is not lloc>
      <cfgridcolumn name="menuID" header="menuID" display="no" />
      <cfgridcolumn name="label" header="label" />
      <!--- <cfgridcolumn name="link" header="link" />--->
      <cfset lloc= menuQuery.menuID>

      And here is the drop downs
      <cfloop index="i" list="#lLIst#">
      LoadaccessLevelType = createObject("component","Erik.maintenace").LoadaccessLevelType(#i#);

      <cfselect query="LoadaccessLevelType" value="accessLevel" display="description" name="access#i#" width="200" label="#LoadaccessLevelType.display#"/>
      Where lList is number from 1 to 18.

      My actionScript is here
      <cfsavecontent variable="getComboBoxValue">
      <cfloop query="TempQuery">

      <cfif TempQuery.accessType neq ''>
      //Set a temp variable to hold the current comboBox value
      var temp1;
      //Loop through all the comboBox values

      for(var i = 0; i < access#accessType#.length; i++){

      //if (myGrid.selectedItem.accessType == temp1) {
      //set the comboBox to the current index
      //set temp to the value of the comboBox
      //if temp equals the selected clientID then stop looping through the comboBox
      </cfsavecontent >