Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






Subgrid blank (json results subgrid data is returned)

No Tags
UserPost

06:32
25/06/2012


veneer

New Member

posts 1

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

No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

67 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9582

Posts: 28755

Membership:

There are 10102 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (6999 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information