jqgrid上要显示图片和上传图片的列,格式如下:
{label:'图片',name:'icon',index:'icon',autowidth:true,formatter:alarmFormatter...custom', editoptions:{custom_element: ImgUpload, custom_value:GetImgValue}},
注意:edittype要为custom 也就是自定义编辑格式....
editoptions:{custom_element: ImgUpload, custom_value:GetImgValue}}
在 jqgrid 的列表里显示图片用到的 js function...function(data, status, e){
alert(e);
}
});
return false;
}
/**
12. icon 编辑的时候该列对应的实际值...ajaxReturn 返回的数据带有pre标签,会导致ajaxFIleUpload 解析不了,所以用了原生的 echo json_encode() 函数
ajaxFileUpload.js
jQuery.extend