知道问题原因了。两个问题:
1.首先该单元格默认时候的value是空,打印时候会进行判断,如果所有单元格为空就不打印。这也就是为什么第一次打印是空白页面的原因
2.就是您需要在您的自定义单元格加入typeName,因为打印的时候会进行序列化,自定义的内容序列化时需要加入typeName:
function AttachmentCellType(options) {
var defaultOptions = {
fileId: "",
fileName: "",
uploadCallBack: false,
downloadCallBack: false,
deleteCallBack: false
};
options = $.extend({}, defaultOptions, options);
this.fileId = options.fileId;
this.fileName = options.fileName;
this.uploadCallBack = options.uploadCallBack;
this.downloadCallBack = options.downloadCallBack;
this.deleteCallBack = options.deleteCallBack;
this.typeName = "AttachmentCellType";
} |