Forum
00:19
09/02/2012
With the latest release (including the fix you provided from the previous issue I reported), if you click the Import Grid button in the sample below, a javascript error occurs while trying to parse the output from jqGridExport:
<!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>
<table id="myGrid2"></table>
<button id="reloadButton" title="Reload Grid">Reload Grid</button>
<button id="importGridButton" title="Import Grid">Import 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");
});
$("#importGridButton").on("click", function (event) {
$("#myGrid2").jqGridImport({
imptype: 'jsonstring',
impstring: serializedGrid,
importComplete: function () {
alert("import done");
}
});
});
});
</script>
</body>
</html>
10:21
Moderators
30/10/2007
Hello,
The export and import is fixed now in Git hub.
https://github.com/tonytomov/jqGrid/commit/7a2e96adcf3e640475746f4a078eb94f9e457f5b
https://github.com/tonytomov/jqGrid/commit/ddb0d3ef17d041da18670fecf748065c3452a79a
You will need to re-export the and import it. (i.e there is a fix in export functions)
Please let me know if the problem is fixed.
Kind Regards
Tony
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:
36 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