Forum



12:59

27/03/2013

Hi all,
I have strange problem:
Girid is imported from json like this:
$('#table1').jqGrid('jqGridImport',{imptype: 'json', impurl: 'table_json.php?table_id=38'});
$('#table1').jqGrid('navGrid','#pagertable1',{edit:false,add:false,del:true},{},{},{'mtype':'GET'});
$('#table1').jqGrid('inlineNav','#pagertable1',{editParams : {'mtype' : 'GET',oneditfunc:ed_table1},addParams:{addRowParams:{oneditfunc:addr_table1}}});
And Navigator is not shown in Firefox, Chrome. In Chrome there is error in console:
Uncaught TypeError: Cannot read property 'id' of undefined jquery.jqGrid.min.js:337.
Strange thing, if i change code like this:
$('#table1').jqGrid('jqGridImport',{imptype: 'json', impurl: 'table_json.php?table_id=38'});
alert(111);
$('#table1').jqGrid('navGrid','#pagertable1',{edit:false,add:false,del:true},{},{},{'mtype':'GET'});
$('#table1').jqGrid('inlineNav','#pagertable1',{editParams : {'mtype' : 'GET',oneditfunc:ed_table1},addParams:{addRowParams:{oneditfunc:addr_table1}}});
Firefox shows Navigator, and it is working.
The same thing with othee grid methods:
$('#table1').setGridParam({rowNum:20}).trigger('reloadGrid'); // Does not work
------------
alert(111);
$('#table1').setGridParam({rowNum:20}).trigger('reloadGrid'); // Works in Firefox
If Grid is described in page (no import) – Navigator works ok in all browsers.
Please, help to locate problem. Thanks.
16:08

27/03/2013

bogus said:
Hi all,
I have strange problem:
Girid is imported from json like this:
$('#table1').jqGrid('jqGridImport',{imptype: 'json', impurl: 'table_json.php?table_id=38'});
$('#table1').jqGrid('navGrid','#pagertable1',{edit:false,add:false,del:true},{},{},{'mtype':'GET'});
$('#table1').jqGrid('inlineNav','#pagertable1',{editParams : {'mtype' : 'GET',oneditfunc:ed_table1},addParams:{addRowParams:{oneditfunc:addr_table1}}});
And Navigator is not shown in Firefox, Chrome. In Chrome there is error in console:
Uncaught TypeError: Cannot read property 'id' of undefined jquery.jqGrid.min.js:337.Strange thing, if i change code like this:
$('#table1').jqGrid('jqGridImport',{imptype: 'json', impurl: 'table_json.php?table_id=38'});
alert(111);
$('#table1').jqGrid('navGrid','#pagertable1',{edit:false,add:false,del:true},{},{},{'mtype':'GET'});
$('#table1').jqGrid('inlineNav','#pagertable1',{editParams : {'mtype' : 'GET',oneditfunc:ed_table1},addParams:{addRowParams:{oneditfunc:addr_table1}}});
Firefox shows Navigator, and it is working.
The same thing with othee grid methods:
$('#table1').setGridParam({rowNum:20}).trigger('reloadGrid'); // Does not work------------
alert(111);
$('#table1').setGridParam({rowNum:20}).trigger('reloadGrid'); // Works in Firefox
If Grid is described in page (no import) – Navigator works ok in all browsers.
Please, help to locate problem. Thanks.
Silly me!! All I needed was in DOC! Just Use importComplete, Luke!
Most Users Ever Online: 715
Currently Online:
69 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