I want make jqgrid in dynamic.
so i have one variable
in which
i.e.
<script type="text/javascript">
$('#ok').click(function(){
var Str='jQuery("#list").jqGrid({ url:'server.php', datatype: "json", colNames:['...'], colModel:[ {...}], rowNum:10, rowList:[10,20,30], pager: '#pager2', sortname: 'id', viewrecords: true, sortorder: "desc", caption:"JSON Example" });'
});
</script>
<html>
<table id="list"></table>
<div id="pager"></div>
</html>
How send Request of jqgrid?
You can manually force a reload of the grid by:
In fact may I suggest that you fully build the grid on the load of the page, with the datatype set to
datatype: localand then on your click event you can justThis way you jqGrid is sitting there, hidden and waiting to be loaded when you click. If the datatype is set to local it will not attempt to load any information till you click.