have implemented jqgrid onto a page of our web application. Everything works as in showing records and removing records but when I put IE compatibility mode into IE 7 or 8 It takes 3 to 5 seconds before it showing the grid. I am also only showing one record.
I am using jquery 1.6 and have tried upgrading to the latest version which makes no difference. One thing i have noticed is jquery calling a function called clean which look to be taking 3 second for only these browsers but I have no idea why or what its doing.
var id = $("#<%=DesID.ClientID%>").val();
$.getJSON("data.aspx?id=" + id, function (data) {
jQuery("#list2").jqGrid({
datatype: 'jsonstring',
colNames: ['', 'Id', 'BodyId', ' Officers Body', 'Alternative Responsible Officer', ''],
colModel: [
{
name: 'RowID',
sortable: false,
shrinkToFit: false,
width: 10,
formatter: function (cellvalue, options, rowObject) {
var Rowid = options.rowId;
return "<span >" + Rowid + " </span>";
}
},
{ name: 'Id', index: 'Id', width: 0, hidden: true, sortable: false },
{ name: 'BodyId', index: 'BodyId', sortable: false, width: 0, hidden: true },
{ name: 'BodyName', index: 'BodyName', sortable: false, shrinkToFit: true },
{ name: 'BodyNameRo', index: 'BodyNameRo', sortable: false, width: '100%' },
{
name: 'Delete',
sortable: false,
shrinkToFit: true,
width: 20,
formatter: function (cellvalue, options, rowObject) {
var Rowid = options.rowId;
return "<input type='button' value='Delete' class='btn' onClick='deleteRecords(" + Rowid + " );' />";
}
}
],
beforeSelectRow: function (rowid, e) {
return false;
},
onInitGrid: function () {
// get reference to parameters
var p = $(this).jqGrid("getGridParam");
// set data parameter
p.datastr = data;
},
viewrecords: true,
caption: "",
autowidth: true,
shrinkToFit: true,
height: '100%',
scroll: false,
gridview: true,
loadOnce: true
});
HiddenJson.val(JSON.stringify(data));
});