日期:2014-05-16 浏览次数:20305 次
<table id="grid-table"></table>
<div id="grid-pager"></div>
<script type="text/javascript">
jQuery(function($) {
var grid_selector = "#grid-table";
var pager_selector = "#grid-pager";
var operation='<div class="visible-md visible-lg hidden-sm hidden-xs action-buttons"><a class="blue" href="#"><i class="icon-zoom-in bigger-130"></i></a><a class="green" href="#"><i class="icon-pencil bigger-130"></i></a><a class="red" href="#"><i class="icon-trash bigger-130"></i></a></div>';
var grid_data =
[
{operation:operation}
]
jQuery(grid_selector).jqGrid({
//url:'tpl/f4Data.php',
datatype: "json",
height: 250,
colNames:['XX', 'XX', 'XX','操作'],
colModel:[
{name:'id',index:'id', width:20, sorttype:"int", editable: true},
{name:'station',index:'station', width:70, editable: true},
{name:'remark',index:'remark', width:70, editable: true, editoptions:{size:"20",maxlength:"20"}},
{name:'operation',index:'operation', width:20, fixed:false, sortable:false, resize:false}
],
loadonce:true,
viewrecords : true,
rowNum:10,
rowList:[10,20,30],
pager : pager_selector,
altRows: true,
multiselect: true,
multiboxonly: true,
//loadComplete : function() {}
editurl: 'editTest.php',
caption: "XX管理",
autowidth: true
});
});
</script>