I am using jqgrid, it is currently working fine in FF, IE8, Chrome, Safari. But in IE7 I get this error:
'this.rows.0.cells' is null or not an object
jquery.jqGrid.min.js
Code: 0
Line: 122 Char: 278
Has anyone come accross this before? Is there a known fix?
update
Here is my PHP code:
$qry = 'SELECT stock_num, shape, carat, clarity, color, cut
FROM rapnet_diamonds
WHERE (carat BETWEEN "0" AND "5")
AND (color BETWEEN "D" AND "Z")
AND ( CASE clarity
WHEN "FL" THEN 0
WHEN "IF" THEN 1
WHEN "VVS1" THEN 2
WHEN "VVS2" THEN 3
WHEN "VS1" THEN 4
WHEN "VS2" THEN 5
WHEN "SI1" THEN 6
WHEN "SI2" THEN 7
WHEN "I1" THEN 8
WHEN "I2" THEN 9
WHEN "I3" THEN 10
ELSE -1 END BETWEEN "0" AND "10")
AND ( CASE cut
WHEN "ideal" THEN 0
WHEN "excellent" THEN 1
WHEN "very good" THEN 2
WHEN "good" THEN 3
WHEN "fair" THEN 4
WHEN "poor" THEN 5
ELSE -1 END BETWEEN "0" AND "5")';
$grid->SelectCommand = $qry;
// set the ouput format to json
$grid->dataType = 'json';
// Let the grid create the model
$grid->setColModel();
// Set grid caption using the option caption
$grid->setGridOptions(array(
"caption"=>"Diamonds Found",
"rowNum"=>200,
"sortname"=>"diamond_id",
"hoverrows"=>true,
"sortable"=>0,
"scroll"=>1,
"height"=>300,
"altRows"=>true,
"colNames"=> array('ID', 'Shape', 'Carat', 'Clarity', 'Color', 'Cut')
));
// Change some property of the field(s)
$grid->setColProperty("diamond_id", array("label"=>"ID", "width"=>60));
// Enjoy
$grid->renderGrid('#grid','#pager',true, null, null, true,true);
$conn = null;
Here is what gets generated:
<table id='grid'></table>
<div id='pager'></div>
<script type='text/javascript'>
jQuery(document).ready(function() {jQuery('#grid').jqGrid({"width":"650","hoverrows":true,"viewrecords":true,"jsonReader":{"repeatitems":false,"subgrid":{"repeatitems":false}},"xmlReader":{"repeatitems":false,"subgrid":{"repeatitems":false}},"gridview":true,"url":"myfirstgrid.php?yellow=","editurl":"myfirstgrid.php?yellow=","cellurl":"myfirstgrid.php?yellow=","onSelectRow":function(rowid, selected)
{
if(rowid != null) {
// alert("selected: "+rowid);
loadSelectedDiamond(rowid);
}
} ,"gridComplete":function()
{
diamondsReloaded();
} ,"caption":"Diamonds Found","rowNum":200,"sortname":"diamond_id","sortable":0,"scroll":1,"height":300,"altRows":true,"colNames":["ID","Shape","Carat","Clarity","Color","Cut"],"datatype":"json","colModel":[{"name":"stock_num","index":"stock_num","editable":true,"sorttype":"string","key":true},{"name":"shape","index":"shape","editable":true,"sorttype":"string"},{"name":"carat","index":"carat","editable":true,"sorttype":"numeric"},{"name":"clarity","index":"clarity","editable":true,"sorttype":"string"},{"name":"color","index":"color","editable":true,"sorttype":"string"},{"name":"cut","index":"cut","editable":true,"sorttype":"string"}],"postData":{"oper":"grid"},"prmNames":{"page":"page","rows":"rows","sort":"sidx","order":"sord","search":"_search","nd":"nd","id":false,"filter":"filters","searchField":"searchField","searchOper":"searchOper","searchString":"searchString","oper":"oper","query":"grid","addoper":"add","editoper":"edit","deloper":"del","excel":"excel","subgrid":"subgrid","totalrows":"totalrows"},"pager":"#pager"}); });
</script>
I am using jqgrid version 3.8