jQuery MiniUI

 找回密码
 立即注册
查看: 4647|回复: 1
打印 上一主题 下一主题

datagrid 怎么禁止编辑 [复制链接]

Rank: 2

跳转到指定楼层
楼主
发表于 2013-10-18 09:32:03 |只看该作者 |倒序浏览
<div field="khbm" width="12%" style="height:20px;" headerAlign="center" align="$result.align"  renderer="_render1"
            autoEscape="false"
           >
                    客户编码<input  id="subform0_cpdl__editor"   property="editor"
         class="mini-textbox" style="width:40px;"   required="true"  
       />
      </div>            
      <div field="khlx" width="11%" headerAlign="center" align="$result.align"  renderer="_render2"
            autoEscape="false"
           >
               客户类型<input enabled="true" id="subform0_cpdl__editor"  emptyText="请输入..." property="editor"
         class="mini-combobox" style="width:40px;"  valueField="fcontent" textField="fcontent"
         data="[{'fcontent':'成套厂','fcode':'09'},{'fcontent':'代理','fcode':'10'},{'fcontent':'设计单位','fcode':'05'},{'fcontent':'投资单位','fcode':'02'},{'fcontent':'用户单位','fcode':'01'},{'fcontent':'总包单位','fcode':'03'}]"
       />
      </div>              
      <div field="khmc" width="21%" headerAlign="center" align="$result.align"  renderer="_render3"
            autoEscape="false" cellStyle="height:20px;"  
           >
                    客户名称<input enabled="true" id="subform0_cpdl__editor"  emptyText="请选择..." property="editor"
         class="mini-buttonedit" style="height:30px;"  allowInput="false" name="khmc1"
       />
      </div>  

上面是我datagrid里面的行,怎么在js里面控制它不能编辑

Rank: 8Rank: 8

沙发
发表于 2013-10-18 09:41:43 |只看该作者
http://www.miniui.com/demo/#src=datagrid/editable.html
参考这个demo。
监听oncellbeginedit
function xxx(e){
   if(xxxx==“xxxx"){
    e.cancel=true
  }
}

Archiver|普加软件

GMT+8, 2025-7-9 23:29 , Processed in 1.055098 second(s), 9 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部