I found several other Uncaught TypeError based questions on SO but not this particular one, so I thought I’ll put this up just in case anyone else has had this issue.
My jqGrid works absolutely fine however I keep seeing this error in the console:
Uncaught TypeError: Cannot read property 'a' of undefined jquery.jqGrid.min.js:423
I checked and this corresponds to line 4364 of jquery.jqGrid.src.js
I’m on version jqGrid-4.4.0
I get the error as soon as the grid loads, but before the grid is populated with data.
I’m concerned even though it works because most of my users are on IE6 and IE is very anal even about the silliest of javascript errors at times.
Any sort of help on this issue will be greatly appreciated.
PS: A couple of things I thought I’ll add after reading responses to similar previously asked questions.
- I’ve already set
root: "rows" - I’ve already set
jsonReader : { repeatitems: false } - The JSON data I’m returning to the grid is of the structure:
{"total": "1", "records": "0", "rows": [], "page": "1"} - EDIT: I also just tried jqGrid-4.4.1 which is the latest version. Still get the same error.
It’s very strange!
The line 4364 of
jquery.jqGrid.src.jsof jQuery4.4.0is inside ofjqModalmodule of jqGrid which is mostly not really required. The module should typically not used during loading of the grid. In many cases it could be not used by settingjqModalparameter to false.I suppose that you have some compatibility problems with other JavaScript plugins which you use.
You can set
$.fn.jqmtoundefinedornullin your code somewhere at the beginning of your code. For example you can do this directly after loading ofjquery.jqGrid.src.jsorjquery.jqGrid.min.js. As the results the modulejqModalwill be not used.