Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Subgrid data returned, but not displaying
28/10/2009
12:21
Avatar
dsh0105
Member
Members
Forum Posts: 4
Member Since:
26/08/2009
sp_UserOfflineSmall Offline

I have a frustrating problem with the subgrid. When clicking the "+" to enlarge a subgrid, Firebug shows that data is being returned, but the subgrid expands empty. My subgrid model is based on a similar subgrid that works correctly. For debguing, I've reduced the subgrid to a single column (still no luck). Please advise.

Here is the code:

jQuery(document).ready(function(){
  jQuery("#list").jqGrid({
    url:'poquery.php?r_type=HIST_MAIN&TESTING=YES',   
    datatype: 'json',
    mtype: 'POST',
    height: 625,
    width:800,
    colNames:['POKEY','PO Number ',    'Date','Invoice','Buyer','Terms'],
    colModel :[
      {name:'POKEY', index:'HEFILE.DH_POHISTA.POKEY', width:45},
      {name:'PONUMB', index:'HEFILE.DH_POHISTA.PNUMB', width:45, formatter:fileLink},
      {name:'PODATE', index:'HEFILE.DH_POHISTA.PODATE', width:50},
      {name:'INVC', index:'HEFILE.DH_POHISTA.INVC', width:25},
      {name:'BUYER', index:'HEFILE.DH_POHITA.POINIT', width:70},     
      {name:'TERMS', index:'HEFILE.DH_POHITA.TERMS', width:70},     
     
    ],
    onCellSelect: function(rowid,iCol, cellcontent,target)
        {

        },
    pager: '#pager',
    rowNum:50,
    rowList:[10,50,100],
    sortname: 'PONUMB',
    sortorder: 'desc',
    viewrecords: true,
    caption: 'Purchase orders - Historical ',
    subGrid : true, subGridUrl: 'poquery.php?r_type=HIST_SUB&TESTING=YES',
    subGridModel: [{ name : ['Line'],
                    width : [50] } ], caption: "PO Detail"
  })
 
$("#s_button").click(function(){ jQuery("#list").searchGrid(
{sopt:['eq']} )});  
 
  $("#mysearch").filterGrid("list",{
        formtype:"vertical",

        formclass:"filterform",
filterModel: [
            {label:'LableFild', name: 'colname', stype: 'text', defval: 'default_value', surl: 'someurl', }],
           
        enableSearch: true,
        enableClear:false,
            searchButton:"Search",
        autosearch:false,
    });   

 });

Here is a sample of the data that is being pulled:

{"total":1,"page":1,"records":1,"rows":[{"id":"1","cell":["1"]}]}

No javaScript errors are being reported..

Please advise.
30/10/2009
07:41
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Note that the data returned for the subgrid little differs of those for the grid. See demos and documentation.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information