在“添加/编辑模型"弹出窗口中,可编辑的列显示不同.如何? [英] Column editable show different in Add/Edit Model Popup. How?

查看:68
本文介绍了在“添加/编辑模型"弹出窗口中,可编辑的列显示不同.如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网格列的结构.

现在的问题是,我只希望CompanyName可编辑并在Edit ModelPopup中播种

对于添加ModelPopup,我希望在弹出窗口中显示以下所有内容.

我该怎么做?

colModel: [
    { name: 'companyID', index: 'companyID', width: 60, editable: false,
      editoptions: { readonly: true } },
    { name: 'companyName', index: 'companyName', width: 190, editable: true,
      editrules: { required: true} },
    { name: 'companyCity', index: 'companyCity', width: 190, editable: true,
      editrules: { required: true} },
    { name: 'companyState', index: 'companyState', width: 50, sortable: false,
      align: 'center', editable: true, editrules: { required: true} },
    { name: 'action', index: 'action', width: 80, sortable: false, align: 'center',
      editable: false, }
 ]
...
 .navGrid('#pager10', { view:true, edit: true, add: true, del: true }

解决方案

最简单的方法是使用此处. >

如果使用内联编辑而不是表单编辑,您可以遵循 解决方案

The most simple way to do this is to use beforeShowForm method. See my old answer on the same subject here.

In case of inline editing instead of form editing you can follow another suggestion from here.

这篇关于在“添加/编辑模型"弹出窗口中,可编辑的列显示不同.如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆