Forum
Topic RSS
12:21
26/08/2009
OfflineI 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.
07:41
Moderators
30/10/2007
OfflineHello,
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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home