0

由于我的 jqgrid 列之一不可编辑,因此我没有将所需的值信息 ie{value:"1:John;2:Smith"} 设置为 editoptions,而是将 formatter:select 和 value info 设置为 formatoptions。当我查看 select formatter 的 js 源代码时,它与 editoptions 紧密结合,特别是为了获取它的“多个”属性。是否可以在不编写自定义格式化程序的情况下实现这一点?

formatter:select
formatoptions:{value:"1:John;2:Smith"}

发送到该列的数据是“1”或“2”,我希望 jqGrid 显示 John 或 Smith。

谢谢,阿尔珀。

4

1 回答 1

1

你是对的,选择格式化程序的代码可以改进为在行中使用opts.colModel.formatoptions.multiple,就像opts.colModel.editoptions.multiple代码行中使用一样。

尽管如此,我不认为这是一个真正的问题。如果您在列中没有editable属性,或者editable: false即使您使用editoptions.

所以我同意你的用法formatoptions.multiple会更好,但我认为这只是“很高兴”的问题。

于 2011-10-18T14:49:03.577 回答