【发布时间】:2026-02-02 19:20:08
【问题描述】:
jqGrid 包含下面使用 colmodel 定义的图像列。图像 id 在 json 中从服务器的单元格值中传递。 如果不在编辑模式下,网格可以正确显示图像。
内联和表单编辑模式显示错误图像,因为 editoptions src 属性包含固定 id 1
如何在编辑模式下显示来自可编辑行 ID 的图像?如何像格式化函数一样将单元格值传递给editoptions src属性?
name:"Image",
edittype:"image",
editoptions:{ src: "GetImage?id=1"},
formatter:function(cell,options,row) {
return "<img src='GetImage?id=" + cell + "'/>"
}
【问题讨论】:
标签: jqgrid