jQuery(‘#grid‘).jqGrid(‘clearGridData‘); jQuery(‘#grid‘).jqGrid(‘setGridParam‘, {data: dataToLoad}); jQuery(‘#grid‘).trigger(‘reloadGrid‘);
<script> $(document).ready(function() { $("#submit").click(function(e) { e.preventDefault(); myGrid.trigger(‘reloadGrid‘); }); }); var url="${servicesUrl}/projects"; var myGrid = $("#projectList").jqGrid({ url: url, datatype: ‘json‘, mtype: ‘GET‘, // ... }); </script>
时间: 2024-10-05 09:02:56