Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Exception on jqGridImport of previous jqGridExport
11/02/2012
00:19
Avatar
stimm
Member
Members
Forum Posts: 4
Member Since:
09/02/2012
sp_UserOfflineSmall Offline

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>

13/02/2012
10:21
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

13/02/2012
18:16
Avatar
stimm
Member
Members
Forum Posts: 4
Member Since:
09/02/2012
sp_UserOfflineSmall Offline

This appears to have fixed it in both my sample as well as the actual project.  Thanks for the fix!

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information