日期:2014-05-16 浏览次数:20447 次
$(document).ready(function(){
jQuery("#gridTable").jqGrid({
url:'/ReadWriteMessage/readWrite',
datatype: "json",
colNames:['文件类型','文件名', '任务编号', '三字码', '时间'],
colModel:[
{name:'type',index:'type',sorttype:"string"},
{name:'fileName',index:'fileName',sorttype:"string"},
{name:'taskId',index:'taskId',sorttype:"string"},
{name:'thrCharCode',index:'thrCharCode', sorttype:"string"},
{name:'time',index:'time',sorttype:"string"}
],
rowNum:10,
pager: '#gridPager',
emptyrecords: "Nothing to display",
viewrecords: true,
jsonReader: {
repeatitems : false
},
caption: "文件信息",
height: '100%'
});
jQuery("#gridTable").jqGrid('navGrid','#gridPager',{edit:false,add:false,del:false});
});
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>readMessage</title>
<link href="css/ui.jqgrid.css" rel="stylesheet" type="text/css">
<link href="plugins/searchFilter.css" rel="stylesheet" type="text/css">
<link href="plugins/ui.multiselect.css" rel="stylesheet" type="text/css">
<link href="css/jquery-ui-1.9.2.custom.css" rel="stylesheet" type="text/css">
<link href="css/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css">
<style>
html, body {
margin: 0;
padding: 0;
font-size: 75%;
}
</style>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="js/jquery.jq