cfgrid 在编辑时显示值而不是值列表
我在 CF 8 中有一个 cfgrid,其中包含下拉框中的名称列表,使用值列表来保存数据。这些值是员工密钥,因为这是我需要在更新时保存的值,并且显示的值包含员工姓名。一切都按预期进行,除了在我选择一个姓名并将焦点移到另一个单元格后,我最终在字段中看到员工 ID 而不是姓名。如果我刷新整个页面,它看起来是正确的,因此编辑会正确更新。我要么需要弄清楚如何解决这个问题,要么如何在选择名称后刷新网格,或者在最坏的情况下,在更改后提交整个页面。无论如何,我不知道该怎么做,并且已经为此工作了好几天。
这是代码:
<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>
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论