技术标签: # JQGrid
分组可以在远程数据上实现。如果选项groupDataSorted被打开,那么sidx参数将被放到分组列名上。
这样,服务器就知道通过第一个分组咧进行排序,并且对列进行排序。
<html>
<head>
<title>jqGrid 实例</title>
</head>
<body>
···代码省略···
<table id="41remote1"></table>
<div id="p41remote1"></div>
···代码省略···
</body>
</html>
$(function(){
pageInit();
});
function pageInit(){
jQuery("#41remote1").jqGrid({
url:ctx+'/JSONData',
datatype: "json",
colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[
{name:'id',index:'id', width:55, editable:true, sorttype:'int',summaryType:'count', summaryTpl : '({0}) total'},
{name:'invdate',index:'invdate', width:90, sorttype:'date', formatter:'date', datefmt:'d/m/Y'},
{name:'name',index:'name', width:100},
{name:'amount',index:'amount', width:80, align:"right", sorttype:'number',formatter:'number'},
{name:'tax',index:'tax', width:80, align:"right",sorttype:'number',formatter:'number'},
{name:'total',index:'total', width:80,align:"right",sorttype:'number',formatter:'number', summaryType:'sum'},
{name:'note',index:'note', width:150, sortable:false,editable:true}
],
rowNum:20,
rowList:[10,20,30],
height: 'auto',
pager: '#p41remote1',
sortname: 'invdate',
viewrecords: true,
sortorder: "desc",
caption:"Grouping with remote data",
grouping: true,
groupingView : {
groupField : ['name', 'invdate'],
groupColumnShow : [true, true],
groupText : ['<b>{0}</b>'],
groupCollapse : false,
groupOrder: ['asc', 'asc'],
groupSummary : [true, true]
}
});
jQuery("#41remote1").jqGrid('navGrid','#p41remote1',{add:false,edit:false,del:false});
}
package net.mn886.blog.jqgrid.loadding_data;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class JSONData
*/
public class JSONData extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public JSONData() {
super();
// TODO Auto-generated constructor stub
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
doPost(req,resp);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
String jsondata = "{\"page\":\"1\"," +
" \"total\":2," +
" \"records\":\"13\"," +
" \"rows\":" +
" [" +
" {" +
" \"id\":\"13\"," +
" \"cell\":" +
" [\"13\",\"2007-10-06\",\"Client 3\",\"1000.00\",\"0.00\",\"1000.00\",null]" +
" }," +
" {" +
" \"id\":\"12\"," +
" \"cell\":" +
" [\"12\",\"2007-10-06\",\"Client 2\",\"700.00\",\"140.00\",\"840.00\",null]" +
" }," +
" {" +
" \"id\":\"11\"," +
" \"cell\":" +
" [\"11\",\"2007-10-06\",\"Client 1\",\"600.00\",\"120.00\",\"720.00\",null]" +
" }," +
" {" +
" \"id\":\"10\"," +
" \"cell\":" +
" [\"10\",\"2007-10-06\",\"Client 2\",\"100.00\",\"20.00\",\"120.00\",null]" +
" }," +
" {" +
" \"id\":\"9\"," +
" \"cell\":" +
" [\"9\",\"2007-10-06\",\"Client 1\",\"200.00\",\"40.00\",\"240.00\",null]" +
" }," +
" {" +
" \"id\":\"8\"," +
" \"cell\":" +
" [\"8\",\"2007-10-06\",\"Client 3\",\"200.00\",\"0.00\",\"200.00\",null]" +
" }," +
" {" +
" \"id\":\"7\"," +
" \"cell\":" +
" [\"7\",\"2007-10-05\",\"Client 2\",\"120.00\",\"12.00\",\"134.00\",null]" +
" }," +
" {" +
" \"id\":\"6\"," +
" \"cell\":" +
" [\"6\",\"2007-10-05\",\"Client 1\",\"50.00\",\"10.00\",\"60.00\",\"\"]" +
" }," +
" {" +
" \"id\":\"5\"," +
" \"cell\":" +
" [\"5\",\"2007-10-05\",\"Client 3\",\"100.00\",\"0.00\",\"100.00\",\"no tax at all\"]" +
" }," +
" {" +
" \"id\":\"4\"," +
" \"cell\":" +
" [\"4\",\"2007-10-04\",\"Client 3\",\"150.00\",\"0.00\",\"150.00\",\"no tax\"]" +
" }" +
" ]," +
" \"userdata\":{\"amount\":3220,\"tax\":342,\"total\":3564,\"name\":\"Totals:\"}" +
" }";
response.getWriter().write(jsondata);
}
}
文章浏览阅读1.4w次。Spring官方下载地址已经迁移到http://maven.springframework.org/release/org/springframework/, 度娘告诉的OSChina、Linuxidc等贴出的地址已经找不到下载列表_spring镜像网站
文章浏览阅读5.1k次,点赞3次,收藏17次。1.准备资源:准备一个U盘,一个Windows镜像,一个ubuntu16.04的镜像,还有一个制作启动盘的软件。资源如下:链接:https://pan.baidu.com/s/12qHZysQccQkFA9dDzOrWBQ 提取码:i79k2.做windows的启动盘:我们需要先将自己的u盘格式化清空。之后双击Universal-USB-Installer-1.9.8.2软..._your pc/device needs to be repaired 不能双系统
文章浏览阅读7.6k次,点赞2次,收藏3次。VSCode扩展开发必要工具脚手架工具Yeoman 和 VSCode Extension Generator安装npm install -g yo generator-code使用yo code根据提示选择,一步步选择打包工具vsce安装npm install -g vcse使用插件的根目录(package.json所在目录)运行vsce package出现的问题&解决方案[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Q_vscode 自定义语法高亮
文章浏览阅读1.2k次,点赞3次,收藏8次。如果你没有时间,想吃 “快餐” ,请直接移步至文末。在上一篇博文中,我介绍了我有线IAP用户程序升级的一些心得,有线升级并不是我的目的,无线才是,所以就有了这篇文章。这篇文章介绍的也是在实现单片机有线升级的基础上,实现无线升级的一些心得和建议。关于有线升级,大家可以在网上搜索或直接看我的上一篇博文我对IAP的理解常用的单片机程序下载方式有三种,即ISP(In System Programing,在系统编程)ICP(In Circuit Programing,在电路编程)IAP(In appl_无线下载iap
文章浏览阅读148次。原标题:未来人类的方向,或许不是人工智能,而是智能人类未来人类的方向,或许不是人工智能,而是智能人类进入互联网时代以来,我们的科技发展速度是越来越快。从工业革命到后来的信息时代、原子时代和现在的智能时代,人类的科技发展周期越来越短,我们似乎进入到了一个技术大爆炸的时代。对此许多人很好奇,我们人类未来的方向是什么?之前我们一直都认为是人工智能,但是科学家们也提出了另一个方向,那就是智能人类。 其实关..._兰森环游世界
文章浏览阅读335次,点赞2次,收藏2次。昨天帮忙打了场比赛,web题目里也是有反序列化的题,也是利用魔术方法的调用来构造pop链,获取flag但那道题好绕我不会写,然后还有关于json的题,就发现自己好多都没学,真的打一场比赛容易把自己人都打傻掉。这道题也是看了好久才明白的题目。废话不多直接上代码 <?php class Demo { private $file = 'index.php'; public function __construct($file) { $this->file =_php_unserialize_pro小明已经学会反序列化啦!但是这道题有点难呢?怎么办呢?
文章浏览阅读2.4k次,点赞4次,收藏28次。华东师范大学软件工程学院实验报告三一、实验目的学会通过Wireshark分析ip协议了解IP数据报的组成了解IP各部分的含义二、实验内容与实验步骤实验内容:获取IP包、理解IP报文的结构、完成Exp3.ppt上面的题目、理解Internet Path、计算IP头部校验和。详细实验步骤见下。三、实验环境Wireshark v3.0.6Windows 10wget四、实..._210.52.217.139
文章浏览阅读134次。一、概述每个系统中都有线程(至少都有一个主线程),而线程最重要的作用就是并行处理,提高软件的并发率。针对界面来说,还能提高界面的响应能力。一般的,为了应用的稳定性,在数据处理等耗时操作会单独在一个线程中运行,而所有与主UI线程有关的控件数据刷新应该到主UI线程中处理。也就是数据处理线程发消息,让界面UI去更新控件。在MFC中线程分为界面线程和工作者线程,界面实际就是一个线程画出来的东西,这个线程维..._刷新控件是放在主线程里吗
文章浏览阅读3.8k次,点赞4次,收藏23次。 详细图片请见附件Overview计划协议(scheduling agreement)是与供货商签订的一项长期合作协议。会预先定义有效时间和采购数量。使用计划协议的好处有:1.可以省去很多PO和合同的release order(直接对SA进行GR操作),SA的delivery schedule line本身就是SA的一部分,因此可以减少文档的数量。2.MRP运行时,可以自动产生delive..._forecast delivery schedule in schedule agreement
文章浏览阅读7.6k次。今天在用气象数据的过程中python报错D:\python366\lib\site-packages\numpy\core\fromnumeric.py:83: RuntimeWarning: invalid value encountered in reduce return ufunc.reduce(obj, axis, dtype, out, **passkwargs)尝试..._invalid value encountered in reduce return ufunc.reduce(obj, axis, dtype, ou
文章浏览阅读115次。凿岩机器人钻臂GPC-PID双模控制黄开启;王雷坤【期刊名称】《《传感器与微系统》》【年(卷),期】2019(000)011【摘要】为避免广义预测控制(GPC)起始阶段存在因所获信息少而对双三角钻臂造成的控制不稳定,以及计算中因矩阵不可逆而造成的数值病态,提出以GPC和比例—积分—微分(PID)控制为基础的双模式自适应控制策略.根据广义预测PID算法得出在线更新的自校正参数,以此参数是否在规定范围..._凿岩钻机配套传感器
文章浏览阅读3.7k次,点赞3次,收藏12次。Matlab操作矩阵的相关方法下面这篇文章主要是对吴恩达老师机器学习中matlab操作的一个整理和归纳一、基本操作1.生成矩阵(ones、zeros)A = [1 2;3 4;5 6] #生成3行4列的矩阵B = [1 2 3] #B就是一个行向量C = [1;2;3] #定义c为一个列向量..._三阶单位矩阵在matlab