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
Error during JQGrid load
13/10/2010
18:10
Avatar
lkritchey
New Member
Members
Forum Posts: 1
Member Since:
11/10/2010
sp_UserOfflineSmall Offline

I am creating a jqgrid that appears in a jquery modal window.  It loads the grid successfully, but while loading the grid, it comes up with the error: Invalid argument.  It pauses at a line in the jquery-1.4.2.min.js file ("{e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);").

To create the grid, I call a webservice, which returns an object.  I serialize the object, and parse it once it is returned to the webpage.  Below is my code to set up the grid:

ItemOverview.prototype.itemGridView = function()  {

$("itemGridView").jqGrid({

mytype: 'POST',

datatype: this.GetData(),

jsonReader: {

root: "root",

repeatitems: false,

id: "itemKey",

cell: ""

},

colNames: ['Item Key', 'Item', 'CAGE', 'Nomen'],

colModel: [

{name: 'itemKey', hidden: true, sortable: false},

{name: 'item', sortable: true},

{name: 'nomenclature', sortable: true}

],

pager: '#pageNavigation',

rowNum: 500,

…moreoptions…

});

}

Below is the code for GetData():

ItemOverview.prototype.GetData = function() {

 

data = this.txtItemNomen.val();

//Web service function - common function for all web pages

var ws = new WebService();

ws.RunFunction("GetItemJsonReader", data, $.proxy(this.GetItemsInList, this), $.proxy(this.Unsuccessful, this));

}

 

This code returns a JSON object with the following data (note that I have real data in the actual code with more than 2 records):

 {"page:":"x","total":"x","records":x,"root":[{"col1":x,"col2":x,"col3":x},{"col1":y,"col2":y,"col3":y}]}

 

Below is the success function (GetItemsInList)

ItemOverview.prototype.GetItemsInList = function(jObject) {

var theGrid=jQuery("#itemGridView")[0];

theGrid.addJSONData(jObject);

}

 

Where GetItemJsonReader() is the webservice function name, this.GetItemsInList is the success function and this.Unsuccessful is the failed option

this.GetItemsInList code below:

 

 ItemOverview.prototype.GetItemsInList = function(jObject) {

var theGrid=jQuery("#itemGridView")[0];

theGrid.addJSONData(jObject);

}

 

Below is the code to show the table in a jQuery modal window:

ItemOverview.prototype.Search_Click = function() {

 

$("#itemGridView").dialog(

{

modal: true,

close: $.proxy(this.DialogClosed, this),

closeText: "hide",

…More Options…

})

 

this.itemGridView();

$("#itemGridView").show();

}

 

Please note again that the data does load successfully – it just comes up with the Invalid argument error while the data is loading.  Any help is very much appreciated…if any other code or information should be posted, please let me know.

Thanks,

Laura

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
63 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