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_Related Related Topics sp_TopicIcon
Exception w/reloadGrid of multiselect json grid (if jqGridExport was called)
09/02/2012
03:00
Avatar
stimm
Member
Members
Forum Posts: 4
Member Since:
09/02/2012
sp_UserOfflineSmall Offline

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>

09/02/2012
16:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

09/02/2012
19:20
Avatar
stimm
Member
Members
Forum Posts: 4
Member Since:
09/02/2012
sp_UserOfflineSmall Offline

Works great... thank you!

tony said:

Hello,

Thank you. fixed:

https://github.com/tonytomov/jqGrid/commit/0d80a8f0098c5128719c7e7664823dbc2a8f8c67

Regards


Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information