Forum
03:00
09/02/2012
It took me a while to track this one down. 🙂 I have a json-loaded, multiselect grid. When jqGridExport is called on it, and then I trigger reloadGrid, I get an exception (Cannot read property 'formatter' of undefined).
The example is below:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Grid Test</title>
<link href="/Content/Site.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="/Scripts/modernizr-2.0.6-development-only.js" type="text/javascript"></script>
<script type="text/javascript" src="/Scripts/grid.locale-en.js"></script>
<script type="text/javascript" src="/Scripts/jquery.jqGrid.src.js"></script>
</head>
<body>
<h2>Grid Test</h2>
<table id="myGrid"></table>
<button id="reloadButton" title="Reload Grid">Reload Grid</button>
<script type="text/javascript">
$(function () {
var serializedGrid = null;
$("#myGrid").jqGrid({
datatype: "json",
url: '/Home/GetGridData',
jsonReader: {
repeatitems: false
},
colModel: [
{ name: "id" },
{ name: "FullName" }
],
multiselect: true,
loadComplete: function (data) {
serializedGrid = $("#myGrid").jqGridExport({ exptype: "jsonstring" });
}
});
$("#reloadButton").on("click", function (event) {
$("#myGrid").clearGridData();
$("#myGrid").trigger("reloadGrid");
});
});
</script>
</body>
</html>
16:14
Moderators
30/10/2007
Hello,
Thank you. fixed:
https://github.com/tonytomov/jqGrid/commit/0d80a8f0098c5128719c7e7664823dbc2a8f8c67
Regards
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.
19:20
09/02/2012
Works great... thank you!
tony said:
Hello,
Thank you. fixed:
https://github.com/tonytomov/jqGrid/commit/0d80a8f0098c5128719c7e7664823dbc2a8f8c67
Regards
Most Users Ever Online: 715
Currently Online:
54 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