easy ui datagrid 设置冻结列
2024-10-12 12:55:58
为了冻结列,您需要定义 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>
最新文章
- CodeForces - 274B Zero Tree
- BZOJ1017: [JSOI2008]魔兽地图DotR
- Azure MySQL PaaS (2) MySQL PaaS修改时区
- ajax返回数据解析总结
- Number对象
- linux下安装QT5:error: unrecognized command line option ‘-fuse-ld=gold’
- Deployment descriptor
- 「NowCoder Contest 295」H. Playing games
- yum upgrade卡在 清理initial-setup-0.3.9.30-1.el7.centos.x86_64
- 【Android】application标签说明
- 【Java】分布式RPC通信框架Apache Thrift 使用总结
- 深入解析Java中的装箱和拆箱
- Hadoop 上使用C 语言编程【转】
- 属性表格 datagridproperty
- Harbor 学习分享系列4 - Harbor常用功能实验
- 解题:USACO13NOV No Change
- RabbitMQ路由类型
- Echart参数详解收藏
- redis(8)集群简介
- Linux学习笔记(4)磁盘分区(fdisk)、挂载与文件系统命令
热门文章
- win8.1恢复win7 CTRL+Space切换输入法
- 解决python 提示 SyntaxError: Missing parentheses in call to &#39;print&#39;
- saltstack实战2--远程执行之目标(target)
- ZooKeeper(3.4.5) - 配置伪集群模式
- Android手机一键Root原理分析
- (转)实战Memcached缓存系统(3)Memcached配置参数初解
- [译]JavaScript检测浏览器前缀
- html5笔记
- Poj 2262 / OpenJudge 2262 Goldbach&#39;s Conjecture
- Linux ed