我在最近几天里对 j干4.1.2进行了实验,越来越多的人以这种方式建立了功能。 有时,页数停止工作,我不能说错了。 当电网负荷时,我可以看到第一页的罚款数据,但当我转换网页时,数据仍然不变。 只有反面改动。 如果我选择了100个减员名单,我就可以看到所有数据。
http://www.trirand.com/blog/jqgrid/jqgrid.html 一切似乎都一样,但我承认我不是最好的 Java典。 这里的违法法典:
<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#testgrid").jqGrid({
url: /Main/DynamicGridData/ ,
mtype: POST ,
datatype: json ,
colNames: [
CustomerId ,
RecordStartUtc ,
RecordEndUtc ,
Id ,
Name ,
Status ,
AudioTitle ,
ServerId ,
ServerName ,
ApplicationInstanceId ,
ApplicationInstanceName ,
ApplicationName ,
ChannelId ,
ChannelFullName ,
],
colModel: [
{ name: CustomerId , index: CustomerId , width: 0, align: left },
{ name: RecordStartUtc , index: RecordStartUtc , width: 0, align: left },
{ name: RecordEndUtc , index: RecordEndUtc , width: 0, align: left },
{ name: Id , index: Id , width: 0, align: left },
{ name: Name , index: Name , width: 0, align: left },
{ name: Status , index: Status , width: 0, align: left },
{ name: AudioTitle , index: AudioTitle , width: 0, align: left },
{ name: ServerId , index: ServerId , width: 0, align: left },
{ name: ServerName , index: ServerName , width: 0, align: left },
{ name: ApplicationInstanceId , index: ApplicationInstanceId , width: 0, align: left },
{ name: ApplicationInstanceName , index: ApplicationInstanceName , width: 0, align: left },
{ name: ApplicationName , index: ApplicationName , width: 0, align: left },
{ name: ChannelId , index: ChannelId , width: 0, align: left },
{ name: ChannelFullName , index: ChannelFullName , width: 0, align: left },
],
pager: #gridpager ,
rowNum:25,
rowList:[25,50,75,100],
sortname: Id ,
sortorder: Asc ,
viewrecords:true,
imgpath: /Content/themes/base/images ,
caption: Test Grid ,
autowidth:true,
width: 100% ,
height: 100% ,
hoverrows:false
});
jQuery("#testgrid").jqGrid(
navGrid , #gridpager ,
{view:true,edit:false,add:false,del:false},{},{},{},
{multipleSearch:true,multipleGroup:false},{closeOnEscape:true}
);
});
</script>
<table id="testgrid"></table>
<div id="gridpager"></div>
Thanks in advance, // Linus