1

I have a cfgrid in CF 8 that contains a list of names in dropdown boxes using valuelists to hold the data. The values are employee keys as that is what I need to save on update and the valuesdisplayed holds the employee name. Everything works as expected except that after I select a name and move the focus to another cell I wind up seeing the employee id in the field instead of the name. If I refresh the whole page it looks correct so the edit is updating correctly. I either need to figure out how to fix this or how to do a refresh of the grid after a name has been selected or worst case, submit the whole page after a change. I haven't be able to figure out anyway to do any of this and been working on it for days.

Here's the code:

<cfgrid  
  name = "grdDetails"  
  format = "html"  
  bind = "cfc:Team.getTeamDetails({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
  stripeRows = true  
  selectColor = "##FF00FB"  
  selectmode="edit"   
  onchange="cfc:Team.editData({cfgridaction},{cfgridrow},{cfgridchanged})"   
>
  <cfgridcolumn width="150" name="floor" header="Team" select="no">  
  <cfgridcolumn width="150" name="PTeam" header="PTeam" select="yes" values="#valuelist(qryP.employee_Key)#" valuesdisplay="#valuelist(qryP.Name)#">  
  <cfgridcolumn width="150" name="POTeam" header="POTeam" select="yes" values="#valuelist(qryPO.employee_Key)#" valuesdisplay="#valuelist(qryPO.Name)#">  
  <cfgridcolumn width="150" name="STeam" header="STeam" select="yes" values="#valuelist(qryS.employee_Key)#" valuesdisplay="#valuelist(qryS.Name)#">  
  <cfgridcolumn width="150" name="HTeam" Header="HTeam" select="yes" values="#valuelist(qryH.employee_Key)#" valuesdisplay="#valuelist(qryH.Name)#">  
  <cfgridcolumn width="150" name="RTeam" header="RTeam" select="yes" values="#valuelist(qryR.employee_Key)#" valuesdisplay="#valuelist(qryR.Name)#">  
  <cfgridcolumn width="150" name="OTeam" header="OTeam" select="yes" values="#valueList(qryO.employee_Key)#" valuesdisplay="#valuelist(qryO.Name)#">  
</cfgrid>
ale
  • 6,369
  • 7
  • 55
  • 65
starfire
  • 13
  • 4
  • ya, if it bothers you, refresh the grid. – Henry Nov 16 '11 at 18:06
  • I would refresh it but I can't figure out a way to do it that works. I can do it if I add a button but then the user has to click it and that looks quite stupid. There's no "onBlur" or anything like it on the cfcolumn that I can use to get it to fire. Any ideas? – starfire Nov 17 '11 at 16:44
  • add a listener: http://www.danvega.org/blog/2008/3/20/CFGrid-Event-Listeners – Henry Nov 17 '11 at 17:21
  • But there is no listener for onChange or onBlur. I can only listen for events _before_ the item changes. Does anyone know how to do an onChange for a cfgrid? – starfire Nov 17 '11 at 19:41

0 Answers0