zoukankan      html  css  js  c++  java
  • jQuery jqGrid中ColModel的参数大全

    ColModel 是jqGrid里最重要的一个属性,设置表格列的属性。
    用法:
    java 代码
    jQuery("#gridid").jqGrid({ 
    ... 
       colModel: [ {name:'name1', index:'index1'...}, {...}, ... ], 
    ... 
    });



    有一些参数当表格初始化完成后是不能被修改的:
         name
          width
          resizable
          label (method avail.)


    例子:$("#grid1").xgrid({   
        url:{url:'../data/json-grid-standard.htm',pageSize:'10',currentPage:'1'},// 列表数据
        colModel:[{"display":"序号","width":"20","align":"center","sortable":"false","name":"xuhao"},
            {"display":"登陆ID","width":32,"align":"center","sortable":"true","name":"LOGIN_ID"},
            {"display":"姓名","width":32,"align":"center","sortable":"true","name":"XM"},
            {"display":"组织机构","width":32,"align":"left","sortable":"true","name":"ORG_ID"},
            {"display":"区域","width":32,"align":"center","sortable":"true","name":"REGION_ID"},
            {"display":"日期","width":32,"align":"center","sortable":"true","name":"DATE"},
            {"display":"是否删除","width":32,"align":"center","sortable":"true","name":"ISDEL","hide":"true"}
           ], //列表结构配置  
        title:'列表控件',
        searchitems:[
            {"display":"登陆ID","name":"LOGIN_ID"},
            {"display":"姓名","name":"XM"},
            {"display":"时间","name":"ORG_ID"},
            {"display":"日期","name":"DATE"},
            {"display":"区域代码","name":"REGION_DM"}
            ],//列表中搜索的条件项
        800,
        callback:function(){ alert('列表初始化完成后,执行回调') },
        searchMode:true  //搜索模式,初始化时不加载数据并隐藏列表
       
      });



  • 相关阅读:
    Promise原理实现(一):前置知识点
    移动端禁用缩放
    多条命令同时执行的包concurrently
    通过面试题学JavaScript知识(1)
    移动设备适配
    css 文本溢出显示省略号
    变量对象的理解
    7.10 日志
    7.9 日志
    JMETER接口测试之自动化环境的配置
  • 原文地址:https://www.cnblogs.com/webenh/p/5806568.html
Copyright © 2011-2022 走看看