找回密码
 立即注册

QQ登录

只需一步,快速开始

Fishborne
金牌服务用户   /  发表于:2020-12-25 11:14  /   查看:2521  /  回复:2
5金币
wijmo.grid.cellmaker.CellMaker 在用户调整格式后无效
在grid 初始化时,图片和按钮列 使用了cellmaker,
当用户在页面调节列宽保存了 theGrid.columnLayout 后,
当用户 再使用新的layout 加载数据后,
图片和按钮就不再显示了

cell 的html 前后对比如下:


检查代码发现, 调整后的columnLayout实际上没有了cellmaker,
仅仅绑了对应的字段

请问使用cellmaker 的情形, 要如何保存用户调节后的 grid layout 而不影响cellmaker 的html ?

2 个回复

倒序浏览
Fishborne
金牌服务用户   /  发表于:2020-12-25 11:18:39
沙发


cellmaker:
  {
                binding: 'image1', header: 'Style_Image', cssClass: 'subimgbox', width: 130,
                cellTemplate: wjCellMaker.makeImage({
                    label: 'image for ${item.image1}',
                    attributes: { alt: 'N' },
                    click: (e, ctx) => {
                        showLargerImage(ctx.item.prodNo, ctx.item.image1);
                    }
                })
            },

columnLayout 变成了仅绑定对应的字段:
{"width":130,"header":"Style_Image","binding":"image1","dataType":1,"isReadOnly":true,"cssClass":"subimgbox"},

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
KevinChen讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2020-12-25 15:01:05
板凳
您好,您的帖子发重了,统一转到此贴回复:
https://gcdn.grapecity.com.cn/fo ... &extra=page%3D1
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部