日期:2014-05-16 浏览次数:20751 次
$.post("EngineTestSearchData.ashx", $("#Form1").serialize(), function (json) {
json = eval("(" + json + ")");
$("#jqgrid1").jqGrid({
datatype: 'local',
data: json.rows,
rowNum: 20,
pager: '#pager1',
colNames: ['ID', '日期', '发动机编号', '台架号'],
colModel: [
{ name: 'ID', index: 'ID', width: 55 },
{ name: '日期', index: '日期', width: 90, formatter: 'date' },
{ name: '发动机编号', index: '发动机编号', width: 100 },
{ name: '台架号', index: '台架号', width: 80, align: "right" }
],
width: 1000,
rowList: [10, 20, 30],
viewrecords: true
}).trigger("reloadGrid");
});
<div id="tabs-1">
<table border="1" style="border-collapse:collapse" id="tbl_condition" >
<thead>
<tr align="center" style="background-color: #E7F7FF; color: #217BAD;">
<th>左括号</th>
<th>条件名称</th>
<th>运算符</th>
<th>值</th>
<th>右括号</th>
<th>关系</th>
<td align="center"><a href="#" id="getAtr"><span style="color: #000">增加条件</span></a></td>
</tr>
</thead>
<tfoot> </tfoot>
<tbody id="addTr" class="style3">
<tr align="center">