Post edited 06:33 – 25/06/2012 by veneer
Post edited 06:35 – 25/06/2012 by veneer
Hi,
When I expand my subgrid it's completly empty:

<script type='text/javascript'>
$(function(){
$('#zoomSalesOrdersPend').jqGrid({
url:'zoomSalesOrdersPendSQL.php?id=SS0020157',
datatype: 'json',
// mtype: 'GET',
colNames:['Item Code','Description','Required Qty','Warehouse Qty','Total Qty','Advised Qty','Stock','Planned Stock','','Order Number'],
colModel :[
{name:'t_item', index:'t_item', width:150},
{name:'desc', index:'desc', width:250},
{name:'rqty', index:'rqty', width:100},
{name:'stockWarehouse', index:'stockWarehouse', width:100},
{name:'tqty', index:'tqty', width:100, align:'left'},
{name:'aqty', index:'aqty', width:100},
{name:'stock', index:'stock', width:100},
{name:'pstock', index:'pstock', width:100},
{name:'act',index:'act', width:75,sortable:false, search:false, label:"<span style='left:33%;position:relative' class='ui-icon ui-icon-arrowthickstop-1-s'></span>"},
{name:'t_orno',index:'t_orno', width:80, hidden:true}
],
pager: '#zoomSalesOrdersPendPager',
caption: '[SS0020157] Sales Order Lines',
subGrid: true,
subGridUrl: 'zoomSubGridSalesOrdersPendSQL.php',
subgridtype: 'json',
subGridModel: [{
name : ['OrderNumber','Position','TransactionType', 'OrderStatus', 'Warehouse', 'Date', 'Qty','StockVariation'],
width : [80,80,120,100,300,160,40,80],
params: ['t_item','t_orno','stockWarehouse']
}],
subGridOptions: {
expandOnLoad: false,
selectOnExpand : false,
reloadOnExpand : true
}
});
// Set navigator with search enabled.
jQuery('#zoomSalesOrdersPend').jqGrid('navGrid','#zoomSalesOrdersPendPager',{add:false,edit:false,del:false, search:false});
jQuery('#zoomSalesOrdersPend').jqGrid('filterToolbar',{defaultSearch : 'cn', searchOnEnter: 'false'});
});
</script>
The data returned is I believe correct json:
{"rows":[{"id":"SS0020157","cell":["SS0020157",30,"Planned Receipt"," ","Service repairs","6 Jul 2012 12:29PM",1,1]},{"id":"SS0020157″,"cell":["SS0020157",40,"Planned Receipt"," ","Service repairs","6 Jul 2012 12:29PM",1,1]},{"id":"SS0020157″,"cell":["SS0020157",50,"Planned Receipt"," ","Service repairs","6 Jul 2012 12:29PM",1,1]},{"id":"SS0020157″,"cell":["SS0020157",60,"Planned Receipt"," ","Service repairs","6 Jul 2012 12:29PM",1,1]}]}
Any help pointing out where I've gone wrong would be appreciated.
Thanks