为了冻结列,您需要定义 frozenColumns 属性。frozenColumn 属性和 columns 属性一样。

$('#tt').datagrid({
title:'Frozen Columns',
iconCls:'icon-save',
width:500,
height:250,
url:'data/datagrid_data.json',
frozenColumns:[[
{field:'itemid',title:'Item ID',width:80},
{field:'productid',title:'Product ID',width:80},
]],
columns:[[
{field:'listprice',title:'List Price',width:80,align:'right'},
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
{field:'attr1',title:'Attribute',width:100},
{field:'status',title:'Status',width:60}
]]
});

您不需要写任何的 javascript 代码,这样您就能创建一个数据网格(datagrid)组件,如下所示:

<table id="tt" title="Frozen Columns" class="easyui-datagrid" style="width:500px;height:250px"
url="data/datagrid_data.json"
singleSelect="true" iconCls="icon-save">
<thead frozen="true">
<tr>
<th field="itemid" width="80">Item ID</th>
<th field="productid" width="80">Product ID</th>
</tr>
</thead>
<thead>
<tr>
<th field="listprice" width="80" align="right">List Price</th>
<th field="unitcost" width="80" align="right">Unit Cost</th>
<th field="attr1" width="150">Attribute</th>
<th field="status" width="60" align="center">Stauts</th>
</tr>
</thead>
</table>

最新文章

  1. CodeForces - 274B Zero Tree
  2. BZOJ1017: [JSOI2008]魔兽地图DotR
  3. Azure MySQL PaaS (2) MySQL PaaS修改时区
  4. ajax返回数据解析总结
  5. Number对象
  6. linux下安装QT5:error: unrecognized command line option ‘-fuse-ld=gold’
  7. Deployment descriptor
  8. 「NowCoder Contest 295」H. Playing games
  9. yum upgrade卡在 清理initial-setup-0.3.9.30-1.el7.centos.x86_64
  10. 【Android】application标签说明
  11. 【Java】分布式RPC通信框架Apache Thrift 使用总结
  12. 深入解析Java中的装箱和拆箱
  13. Hadoop 上使用C 语言编程【转】
  14. 属性表格 datagridproperty
  15. Harbor 学习分享系列4 - Harbor常用功能实验
  16. 解题:USACO13NOV No Change
  17. RabbitMQ路由类型
  18. Echart参数详解收藏
  19. redis(8)集群简介
  20. Linux学习笔记(4)磁盘分区(fdisk)、挂载与文件系统命令

热门文章

  1. win8.1恢复win7 CTRL+Space切换输入法
  2. 解决python 提示 SyntaxError: Missing parentheses in call to &#39;print&#39;
  3. saltstack实战2--远程执行之目标(target)
  4. ZooKeeper(3.4.5) - 配置伪集群模式
  5. Android手机一键Root原理分析
  6. (转)实战Memcached缓存系统(3)Memcached配置参数初解
  7. [译]JavaScript检测浏览器前缀
  8. html5笔记
  9. Poj 2262 / OpenJudge 2262 Goldbach&#39;s Conjecture
  10. Linux ed