zoukankan      html  css  js  c++  java
  • 目前用到最全的datagrid(easyui)


    包含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:'选择',40,align:'center', rowspan:2,
                     checkbox:true
                 },
                 {field:'aa',title:'启用',60,align:'center', rowspan:2
                 },
                 {title:'判断方式',align:'center',colspan:2},
                 {title:'关闸方式',align:'center',colspan:5},
                 {field:'aaa',title:'说明',300,align:'left', rowspan:2
                 },
             ],[ 
                 {field:'projectID',
                     title:'渠道',
                     100,
                     editor:{
                         type:'combobox',
                         options:{
                             data:status.statusResult,
                    valueField:'statusKey',
                    textField:'statusVaule',
                    panelHeight:'auto',
                             editable:false,
                             onSelect:function(record){
                             } 
                         } 
         }
                 },
                 {field: 'FlowTypeCode', title: '超期库龄', 80, align: 'right',
                     editor: {
                         type: 'text',
                         options: { required: true }
                     }
                 },
                 {field:'col4',title:'渠道',100,rowspan:1},
                 {field:'name1',title:'品牌',100,rowspan:1},
                 {field:'addr1',title:'品类',100,rowspan:1},
                 {field:'col41',title:'型号',100,rowspan:1},
                 {field:'ss',title:'库位',100,rowspan:1}
                ]
            ]
        });
     $('#dataGrid').parent().find("div .datagrid-header-check").children("input[type='checkbox']").eq(0).attr("checked", false);
    });

  • 相关阅读:
    (转)导弹跟踪算法
    中文linux安装oracle界面乱码解决方案
    linux下创建oracle表空间
    [INS-20802] Oracle Net Configuration Assistant failed
    Centos6.5下Oracle 11g R2安装过程
    设置MYSQL数据库编码为UTF-8
    如何在linux系统中设置静态ip地址
    Oracle Net Configuration Assistant failed异常的解决方案
    解决安装oracle11g r2时提示pdksh conflicts with ksh-20100621-2.el6.i686问题
    CentOS增加swap分区大小
  • 原文地址:https://www.cnblogs.com/superJF/p/4398732.html
Copyright © 2011-2022 走看看