easyui 动态生成datagrid
来源:互联网 发布:mysql 主从同步 编辑:程序博客网 时间:2024/04/29 14:39
function getItemTable(id, type) { tabInfoItem.datagrid({ url:'', data: [], columns: [[]], pagination:false }); var url = '/InfoItemList'; var para = {}; if (type == 'code') { url = '/CodeValueList'; para.itemId = id; } else { para.setId = id; } var column = [[]]; if (type == 'code') { column[0][0] = { field: 'code', title: '代码', width: 50, align: 'center' }; column[0][1] = { field: 'name', title: '名称' }; } else { column[0][0] = { field: 'sn', title: '编号', width: 80, align: 'center' }; column[0][1] = { field: 'name', title: '名称', width: 80, align: 'center' }; column[0][2] = { field: 'description', title: '中文名称', align: 'center' }; column[0][3] = { field: 'itemtype', title: '类型', width: 80, align: 'center', formatter: function (value, row, index) { var str = ''; for (i = 0; i < itemTypeList.length; i++) { if (itemTypeList[i].id == value) { str = itemTypeList[i].value; break; } } return str; } }; column[0][4] = { field: 'itemlength', title: '长度', width: 50, align: 'center' }; column[0][5] = { field: 'remark', title: '备注', align: 'left' }; } var dataconfig = { url: url, idField: 'id', rownumbers: true, singleSelect: true, striped: true, fit: true, border: true, columns: column } if (type == 'code') { dataconfig.pagination = true; dataconfig.pageSize = 30; dataconfig.queryParams = { itemId: id }; } else { dataconfig.queryParams = { setId: id }; } tabInfoItem.datagrid(dataconfig); if (type == 'code') { var p = tabInfoItem.datagrid('getPager'); (p).pagination({ beforePageText: '第',//页数文本框前显示的汉字 afterPageText: '页 共 {pages} 页', displayMsg: '共{total}条数据' }); } }
清空行、列、分页:
tabInfoItem.datagrid({ url:'', data: [], columns: [[]], pagination:false });
实现了同一个表格的不同数据源,不同参数,是否分页的参数化显示。
0 0
- easyui 动态生成datagrid
- easyui datagrid 动态生成列
- easyui datagrid动态生成列
- Easyui DataGrid动态生成列
- Easyui DataGrid动态生成列
- easyui datagrid 动态生成列
- easyui 动态生成datagrid列
- easyui datagrid 动态生成列
- easyui datagrid 动态生成列
- easyui datagrid+ashx实现动态生成列
- Easyui datagrid+ashx 实现动态生成列
- 完整的easyui datagrid 动态生成列
- JQuery EasyUI 根据数据动态生成datagrid
- Easyui-Datagrid实例-----动态加载数据生成Datagrid
- easyui之datagrid:动态生成列(动态报表)
- JQuery EasyUI 根据数据动态生成datagrid,统计常用
- easyui datagrid 生成动态列后 实现分页
- jquery easyui datagrid 动态生成表头 + 嵌套对象属性展示
- 2017-03-23 中青宝 预计会低开
- c#学习笔记_结构体
- RabbitMQ基础内容详细介绍
- NGINX 反向代理
- Redis Studio 详细介绍
- easyui 动态生成datagrid
- 政府采购的组织形式
- 获取cookie的3种方式
- 如何修改MyEclipse的SVN账户
- hello world
- 贝叶斯全局优化
- c#ref和out区别
- postgres-xl 数据库 安装中文分词 zhparser
- commonjs vs commonjs2