闫士佳的第一篇博客——subgrid
来源:互联网 发布:淘宝流量统计工具 编辑:程序博客网 时间:2024/06/16 10:00
今天做后台时遇到dategrid下面还需要嵌套一个dategrid情况,在网上借鉴了很多人的博客,最终做出来样子是这样的
以下是body里面的代码
<table id="dg" style="width:700px;height:250px" url="" title="经销商管理" singleSelect="true" fitColumns="true" rownumbers="true" fitColumns="true" fit="true" nowrap="false" striped="true" singleSelect="true" > <thead> <tr> <th field="sellername" align=left" width="100">经销商名称</th> <th field="contacts" align="left" width="100">联系人</th> <th field="tel" align="left" width="100">联系方式</th> </tr> </thead></table>
以下是javascript里面代码
<script type="text/javascript" src="http://www.jeasyui.com/easyui/datagrid-detailview.js"></script>//主体信息表格 <script type="text/javascript"> $(function(){ $('#dg').datagrid({ view: detailview, detailFormatter:function(index,row){ return '<div style="padding:2px"><table class="ddv"></table></div>'; }, onExpandRow: function(index,row){ var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv'); ddv.datagrid({ url:'', // fitColumns:true, singleSelect:true, rownumbers:true, loadMsg:'加载中...', height:'auto', columns:[[ {field:'categoryname',title:'授权代理品规',width:100}, {field:'district',title:'授权经营范围',width:100}, {field:'cutofftime',title:'授权截止日期',width:100} ]], onResize:function(){ $('#dg').datagrid('fixDetailRowHeight',index); }, onLoadSuccess:function(){ setTimeout(function(){ $('#dg').datagrid('fixDetailRowHeight',index); },0); } }); $('#dg').datagrid('fixDetailRowHeight',index); } }); }) </script>
下面是官网地址,没看懂的朋友可以去官网看看
http://www.jeasyui.com/tutorial/datagrid/datagrid22.php
1 0
- 闫士佳的第一篇博客——subgrid
- 第一篇博客——写博客的目的
- 小昆哥—>博客第一篇
- 第一篇的博客
- ***的第一篇博客
- 博客的第一篇
- 博客的第一篇
- 狂龙的第一篇博客——好友必读!
- 我的第一篇博客——宣言
- javascript模拟时钟 ——我的第一篇博客
- 超群梦幻——我的第一篇博客
- 黑马程序员——我的第一篇博客
- 委托与事件——我的第一篇博客
- 黑马程序员——我的第一篇博客文章
- 我的第一篇博客——写在前面的话
- 第一篇——我的博客起因
- 我的第一篇博客——开篇
- 第一篇博客。——记录复杂的心情
- php动态扩展函数库依赖
- 问题 Q: 铺地毯
- [生存志] 第145节 班固著汉书
- 性能工具造数据 (jmeter)
- 多线程传递Context multi-thread context(MTC)
- 闫士佳的第一篇博客——subgrid
- Androidstudio快捷键(转载请注明:Android开发中文站 » Android Studio 快捷键)
- 【斯坦福大学-机器学习】2.单变量线性回归(一)
- VMware fusion下ubuntu(16)虚拟机编译安卓源码笔记
- 2017年2月员工工资结算
- 线段树入门
- Windows环境下使用强大的wget工具
- 我是优雅的分割线————————————————————————————————————————————
- 垃圾回收机制(GrabageColllection,GC)