Hi there,
I have a grid setup in FF and am trying to get it to work in IE.
This is my js code:
var lastsel;
var fullwidth=window.innerWidth-50;
recno=$("#recid").val()
jQuery("#rowicsi").jqGrid({
url:'portaldata.php?q=2&ID='+recno,
datatype: "json",
colNames:,
colModel:[
{name:'det',index:'det', width:15, sortable:false},
{name:'dag',index:'Emb_dag', width:155, editable:true,sortable:false},
{name:'emb',index:'IDcodeCHECK1', width:190, editable:true},
{name:'door',index:'Emb_score_door', width:100,editable:true},
{name:'spec',index:'Emb_rijpheid', width:180,editable:true,edittype:"select",editoptions:{value:":;MII:MII;MI:MI;GV:GV;deg:deg;deg/hya:deg/hya"}},
{name:'bevr',index:'Emb_bevruchting', width:180,editable:true,edittype:"select",editoptions:{value:":;0:0;1:1;2:2;3:3;anders:anders"}},
{name:'del',index:'Emb_deling', width:180, editable:true,edittype:"select",editoptions:{value:":;1:1;2:2;3:3;4:4;5:5"}},
],
rowNum:10,
imgpath: '../images/jqgrid',
pager: jQuery('#prowicsi'),
sortname: 'Emb_dag',
viewrecords: true,
sortorder: "asc",
width: fullwidth,
height: 250,
onSelectRow: function(id){
if(id && id!==lastsel){
jQuery('#rowicsi').restoreRow(lastsel);
jQuery('#rowicsi').editRow(id,true);
lastsel=id;
}
},
loadComplete: function(){
var ids = jQuery("#rowicsi").getDataIDs();
for(var i=0;i";
jQuery("#rowicsi").setRowData(ids,{det:de})
}
},
editurl: "editembgrid.php"
});
The portaldata.php file returnes the following json code:
{"page":"1","total":2,"records":11,"rows":[{"id":"12780155","cell":["","0","1","STB","","",""]},{"id":"12780157","cell":["","0","3","STB","","",""]},{"id":"12780158","cell":["","0","4","STB","","",""]},{"id":"12780159","cell":["","0","5","STB","deg","",""]},{"id":"12780160","cell":["","0","6","STB","","",""]},{"id":"12780161","cell":["","0","7","STB","","",""]},{"id":"12780162","cell":["","0","8","STB","","",""]},{"id":"12780163","cell":["","0","9","STB","","",""]},{"id":"12780164","cell":["","0","10","STB","","",""]},{"id":"12780165","cell":["","0","11","STB","","",""]}]}
The error I get in IE is “Lenght of ColNamesColModel or 0”
What am I missing?
Wouter.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top