包含checkbox、复合表头、多行可编辑单元格、combobox单元格,就差上次做的table中每行中的关联检索combobox单元格了。
目前已修改为单行编辑,多行编辑时的check有问题

$("#add").click(function(){
 var index=$('#dataGrid').datagrid('appendRow', {         
     FlowTypeName: 'new name',
     FlowTypeCode: 30                
 }).datagrid('getRows').length-1;
 $('#dataGrid').datagrid('beginEdit',index);
});
$(function () {
 var datagrid;
 var status = { "statusResult": [
                          { "statusKey": "ALL", "statusVaule":"全部" },
                          { "statusKey": "70", "statusVaule":"已开入WA提单" },
                          { "statusKey": "80", "statusVaule":"已入WA库" }]};
                          console.info(status.statusResult);
   datagrid = $('#dataGrid').datagrid({
        url: "/purchase/findPredictingStockDetailList.html",
        fit: true,
        fitColumns: false,
        toolbar: $('#tb'),
        singleSelect: true,
        nowrap: true,
        rownumbers: true,
        singleSelect: false,
  selectOnCheck: true,
  checkOnSelect: true,
  onClickCell: function(index,field,value){
   $(this).datagrid('beginEdit', index);
   var ed = $(this).datagrid('getEditor', {index:index,field:field});
   $(ed.target).focus();
//   $(ed).blur(function(){
//    alert(1111111111111111);
//    $(this).datagrid('endEdit', index);
//   });
  },
        queryParams: {
            report_year_week: "$!report_year_week"
        },
        columns: [
            [
             {field:'check',title:'选择',width:40,align:'center', rowspan:2,
                 checkbox:true
             },
             {field:'aa',title:'启用',width:60,align:'center', rowspan:2
             },
             {title:'判断方式',align:'center',colspan:2},
             {title:'关闸方式',align:'center',colspan:5},
             {field:'aaa',title:'说明',width:300,align:'left', rowspan:2
             },
         ],[ 
             {field:'projectID',
                 title:'渠道',
                 width:100,
                 editor:{
                     type:'combobox',
                     options:{
                         data:status.statusResult,
                valueField:'statusKey',
                textField:'statusVaule',
                panelHeight:'auto',
                         editable:false,
                         onSelect:function(record){
                         } 
                     } 
     }
             },
             {field: 'FlowTypeCode', title: '超期库龄', width: 80, align: 'right',
                 editor: {
                     type: 'text',
                     options: { required: true }
                 }
             },
             {field:'col4',title:'渠道',width:100,rowspan:1},
             {field:'name1',title:'品牌',width:100,rowspan:1},
             {field:'addr1',title:'品类',width:100,rowspan:1},
             {field:'col41',title:'型号',width:100,rowspan:1},
             {field:'ss',title:'库位',width:100,rowspan:1}
            ]
        ]
    });
 $('#dataGrid').parent().find("div .datagrid-header-check").children("input[type='checkbox']").eq(0).attr("checked", false);
});

最新文章

  1. cocoapod
  2. oracle 10g 安装时字符集的选择,和后边的修改
  3. VS2008上借助VA来提示QT API
  4. [转]bit与byte
  5. discuz 系列产品 在ie9下注册成功后不跳转bug处理
  6. FHS目录配置下,常见的几个问题及解答
  7. PHP读取Mongodb数据报错,Cannot natively represent the long 8331412483000 on this platform
  8. supervisor进程管理
  9. 【转】Objective-C中一种消息处理方法performSelector: withObject:
  10. Unix/Linux环境C编程入门教程(9) unbntu CCPP开发环境搭建
  11. 创建 OVS vlan100 netwrok - 每天5分钟玩转 OpenStack(137)
  12. a标签包含块级元素问题
  13. 二、Solr单机版的搭建
  14. mysql修改root用户密码
  15. ROS系统MoveIt玩转双臂机器人系列(一)
  16. IT题库6-同步和异步
  17. C++ 深入理解 虚继承、多重继承和直接继承
  18. Spark On Yarn报警告信息 WARN yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.
  19. blender 快捷键手动整理
  20. Servlet基础学习

热门文章

  1. 网络安全之PHP安全编程建议
  2. passivedns 安装指南
  3. 分析一个嵌入payload的恶意.lnk文件
  4. Ubuntu 14.10 下安装navicat
  5. jsunit测试
  6. CRM客户关系管理系统修改(十四)
  7. XMLParser解析xml--内容源自网络(在静态库中不能用GDATA来解析,因为静态库不能加动态库)
  8. 在windows下安装GIT
  9. Redis 3.0 集群搭建
  10. java项目上各种小问题