Forum
01:56
02/07/2014
Hi,
Â
my grid persists empty.
I don´t know why - what must i change?
Tanks
Here is my code:
 <!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css">
<link rel="stylesheet" href="jqgrid/css/ui.jqgrid.css">
<script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.0/jquery.xdomainrequest.min.js'></script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="jqgrid/js/grid.locale-de.js"></script>
<script src="jqgrid/js/jquery.jqGrid.min.js"></script>
<script type="text/javascript">
$(function () {
   $("#list").jqGrid({
      url: 'http://www.iNorthwind.com/Service1.svc/getOrdersForCustomer/BERGS',
      contentType: "application/json",
      datatype: "json",
      jsonReader: {
          root: "GetOrdersForCustomerResult",
          id: "OrderID",
          repeatitems: false
      },
      mtype: "GET",
      colNames: ["ID", "Date", "ShipName", "ShipAddress", "ShipCity", "ShippedDate"],
      colModel: [
          { name: "OrderID", width: 80, align: "center" },
          { name: "OrderDate", width: 90, align: "center" },
          { name: "ShipName", width: 250 },
          { name: "ShipAddress", width: 250 },
          { name: "ShipCity", width: 95 },
          { name: "ShippedDate", width: 95 },
      ],
      pager: "#pager",
      height: 'auto',
      rowNum: 8,
      rowList: [8, 16, 24],
      loadonce: true,
      sortname: "OrderID",
      sortorder: "desc",
      viewrecords: true,
      gridview: true,
      ignoreCase: true,
      autoencode: true,
      caption: "Northwind orders"
   });
});
</script>
</head>
<body>
   <table id="list"><tr><td></td></tr></table>
   <div id="pager"></div>
</body>
</html>
Insert title here
//
 |
10:52
Moderators
30/10/2007
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
39 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66