gpt4 book ai didi

jquery - JQGrid 值和文本列

转载 作者:行者123 更新时间:2023-12-01 07:34:52 26 4
gpt4 key购买 nike

我有一列想要在读取/显示模式下显示为文本(例如城市名称)。当用户单击编辑时,我希望它显示为选择,然后我将传递 CityID,以便我可以显示选择控件,其中 options==CityID 为选定的。

jqGrid 是否具有开箱即用的此功能,或者我是否必须实现自定义格式化程序?

谢谢

最佳答案

已经收到了

这是我的解决方案

col模型

{ name: 'CityID', index: 'CityID', width: 55, editable: true, edittype: 'select',  editoptions: { dataUrl: 'City/GenerateCityOptions' }, formatter: CityFormatter},

function CityFormatter(cellvalue, options, rowObject) {

return rowObject.CityName; //The field name that i wanted to be displayed instead of id

}

关于jquery - JQGrid 值和文本列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3288521/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com