working jqGrid Example
by Oleg Kiriljuk
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/redmond/jquery-ui.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/css/ui.jqgrid.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/i18n/grid.locale-en.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/jquery.jqGrid.src.js"></script>
<table id="grid"></table>
JavaScript
$("#grid").jqGrid({
datatype: "local",
data: [
{id:48803, thingy:"DSK1", blank:"", number:"02200220", status:"OPEN"},
{id:48769, thingy:"APPR", blank:"", number:"77733337", status:"ENTERED"}
],
height: "auto",
colNames: ['Inv No', 'Thingy', 'Blank', 'Number', 'Status'],
colModel: [
{ name: 'id', width: 60, sorttype: "int" },
{ name: 'thingy', width: 90,
hidden: 'true' //<------uncomment this line to see the bug: Blank values are not blank anymore
},
{ name: 'blank', width: 50 },
{ name: 'number', width: 80, sorttype: "float"},
{ name: 'status', width: 80 }
],
caption: "Stack Overflow Example"
});