Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
wiki:first_grid [2013/05/27 10:01]
olegk add X-UA-Compatible meta in head
wiki:first_grid [2013/05/27 10:09]
olegk small changes of the code
Line 72: Line 72:
  
 <script type="​text/​javascript">​ <script type="​text/​javascript">​
-$(function(){  +$(function () { 
-  $("#​list"​).jqGrid({ +    $("#​list"​).jqGrid({ 
-    url: 'example.php'+        url: "example.php"
-    datatype: ​'xml'+        datatype: ​"xml"
-    mtype: ​'GET'+        mtype: ​"GET"
-    colNames: ['Inv No''Date''Amount''Tax''Total''Notes'], +        colNames: ["Inv No""Date""Amount""Tax""Total""Notes"], 
-    colModel :[  +        colModel: [ 
-      {name:'invid', index:'​invid'​, width:55},  +            { name: "invid", width: 55 }, 
-      {name:'invdate', index:'​invdate'​, width:90},  +            { name: "invdate", width: 90 }, 
-      {name:'amount', index:'​amount'​, width:80, align:'right'},  +            { name: "amount", width: 80, align: ​"right" ​}, 
-      {name:'tax', index:'​tax'​, width:80, align:'right'},  +            { name: "tax", width: 80, align: ​"right" ​}, 
-      {name:'total', index:'​total'​, width:80, align:'right'},  +            { name: "total", width: 80, align: ​"right" ​}, 
-      {name:'note', index:'​note'​, width:150, sortable:​false}  +            { name: "note", width: 150, sortable: false } 
-    ], +        ], 
-    pager: ​'#pager'+        pager: ​"#pager"
-    rowNum:​10,​ +        rowNum: 10, 
-    rowList:​[10,​20,​30],​ +        rowList: [10, 20, 30], 
-    sortname: ​'invid'+        sortname: ​"invid"
-    sortorder: ​'desc'+        sortorder: ​"desc"
-    viewrecords:​ true, +        viewrecords:​ true, 
-    gridview: true, +        gridview: true, 
-    caption: ​'My first grid' +        ​autoencode:​ true, 
-  }); +        ​caption: ​"My first grid" 
 +    }); 
 });  }); 
 </​script>​ </​script>​
Line 100: Line 101:
 </​head>​ </​head>​
 <​body>​ <​body>​
-<table id="​list"><​tr><​td/></​tr></​table>​  +    ​<table id="​list"><​tr><​td></td></​tr></​table>​  
-<div id="​pager"></​div> ​+    <div id="​pager"></​div> ​
 </​body>​ </​body>​
 </​html>​ </​html>​

QR Code
QR Code wiki:first_grid (generated for current page)